MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / col

Function col

lib/sqlalchemy/orm/util.py:377–384  ·  view source on GitHub ↗
(name, table)

Source from the content-addressed store, hash-verified

375 colnamemaps[table] = m
376
377 def col(name, table):
378 try:
379 return colnamemaps[table][name]
380 except KeyError:
381 if cast_nulls:
382 return sql.cast(sql.null(), types[name]).label(name)
383 else:
384 return sql.type_coerce(sql.null(), types[name]).label(name)
385
386 result = []
387 for type_, table in table_map.items():

Callers 3

polymorphic_unionFunction · 0.85
pkMethod · 0.85
exp_columnsMethod · 0.85

Calls 2

labelMethod · 0.45
castMethod · 0.45

Tested by 2

pkMethod · 0.68
exp_columnsMethod · 0.68