neuralib.sqlp.func_stat
SQL help functions.
- neuralib.sqlp.func_stat.alias(x: str, name: str) Any[source]
- neuralib.sqlp.func_stat.alias(x: type[T], name: str) type[T]
- neuralib.sqlp.func_stat.alias(x: SqlStat[T], name: str) type[T]
- neuralib.sqlp.func_stat.case(x=None)[source]
https://www.sqlite.org/lang_expr.html#the_case_expression
- Parameters:
x
- Returns:
- Return type:
- neuralib.sqlp.func_stat.exists(x: SqlStat) SqlExpr[source]
- neuralib.sqlp.func_stat.exists(x: type, *where: bool | expr.SqlExpr) SqlExpr
https://www.sqlite.org/lang_expr.html#the_exists_operator
>>> exists(A, A.a == 1) # equivalent below >>> exists(select_from(1, from_table=A).where(A.a == 1))
- Parameters:
x
where
- Returns:
- neuralib.sqlp.func_stat.contains(x, coll)[source]
- Parameters:
x
coll – a sequence or a select statement.
- Returns:
- Return type:
- neuralib.sqlp.func_stat.not_contains(x, coll)[source]
- Parameters:
x
coll – a sequence or a select statement.
- Returns:
- Return type:
- neuralib.sqlp.func_stat.between(x, *value)[source]
https://www.sqlite.org/lang_expr.html#the_between_operator
- Parameters:
x
value – two value, or a range, a slice.
- Returns:
- Return type:
- neuralib.sqlp.func_stat.not_between(x, *value)[source]
https://www.sqlite.org/lang_expr.html#the_between_operator
- Parameters:
x
value – two value, or a range, a slice.
- Returns:
- Return type:
- neuralib.sqlp.func_stat.excluded(t)[source]
https://www.sqlite.org/lang_upsert.html
- Parameters:
t (type[T])
- Return type:
type[T]
- neuralib.sqlp.func_stat.with_common_table(name: str, select: SqlSelectStat) SqlCteExpr[source]
- neuralib.sqlp.func_stat.with_common_table(name: type[T], select: SqlSelectStat) type[T]