MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / get_arg_sql

Method get_arg_sql

tortoise/functions.py:62–68  ·  view source on GitHub ↗
(arg, ctx: SqlContext)

Source from the content-addressed store, hash-verified

60class _Concat(functions.Concat):
61 @staticmethod
62 def get_arg_sql(arg, ctx: SqlContext):
63 sql = arg.get_sql(ctx.copy(with_alias=False)) if hasattr(arg, "get_sql") else str(arg)
64 # explicitly convert to text for postgres to avoid errors like
65 # "could not determine data type of parameter $1"
66 if ctx.dialect.value == "postgresql":
67 return f"{sql}::text"
68 return sql
69
70
71class Concat(Function):

Callers

nothing calls this directly

Calls 1

get_sqlMethod · 0.45

Tested by

no test coverage detected