MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / col

Function col

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

Source from the content-addressed store, hash-verified

366 colnamemaps[table] = m
367
368 def col(name, table):
369 try:
370 return colnamemaps[table][name]
371 except KeyError:
372 if cast_nulls:
373 return sql.cast(sql.null(), types[name]).label(name)
374 else:
375 return sql.type_coerce(sql.null(), types[name]).label(name)
376
377 result = []
378 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