ralsei.types.value_column
¶
Module Contents¶
Classes¶
Column and its associated value, base class for |
|
Column template class with an associated value |
|
Rendered column class with an associated value |
|
Renders to |
|
Column name and its associated value, used inside a WHERE clause for locating a row |
API¶
-
class ralsei.types.value_column.ValueColumnBase(name: str, value: Any =
FROM_NAME
)¶ Bases:
ralsei.types.column.ColumnBase
Column and its associated value, base class for
ValueColumn
andValueColumnRendered
- Parameters:¶
- name: str¶
column name
- value: Any =
FROM_NAME
¶ value that will be applied to the column
By default, will be set to a
ralsei.types.Placeholder
with the same name as the column
Initialization
- property set_statement : ralsei.types.value_column.ValueColumnSetStatement¶
As set statement (name = value)
- abstract render(env: ralsei.jinja.ISqlEnvironment, /, **params: Any) ralsei.types.value_column.ValueColumnRendered ¶
Turn into the rendered version
-
class ralsei.types.value_column.ValueColumn(name: str, type: str, value: Any =
FROM_NAME
)¶ Bases:
ralsei.types.column.Column
,ralsei.types.value_column.ValueColumnBase
Column template class with an associated value
- Parameters:¶
Initialization
- render(env: ralsei.jinja.ISqlEnvironment, /, **params: Any) ralsei.types.value_column.ValueColumnRendered ¶
Render the type template
-
class ralsei.types.value_column.ValueColumnRendered(name: str, type: str, value: Any =
FROM_NAME
)¶ Bases:
ralsei.types.column.ColumnRendered
,ralsei.types.value_column.ValueColumnBase
Rendered column class with an associated value
- Parameters:¶
Initialization
- render(env: ralsei.jinja.ISqlEnvironment, /, **params: Any) ralsei.types.value_column.ValueColumnRendered ¶
- class ralsei.types.value_column.ValueColumnSetStatement(value_column: ralsei.types.value_column.ValueColumnBase)¶
Bases:
ralsei.types.to_sql.ToSql
Renders to
name = value
, for use in UPDATE statementsInitialization
-
value_column : ralsei.types.value_column.ValueColumnBase =
None
¶
- to_sql(env: ralsei.jinja.ISqlEnvironment) str ¶
-
value_column : ralsei.types.value_column.ValueColumnBase =
-
class ralsei.types.value_column.IdColumn(name: str, value: Any =
FROM_NAME
)¶ Bases:
ralsei.types.to_sql.ToSql
Column name and its associated value, used inside a WHERE clause for locating a row
Renders to
name = value
- Parameters:¶
- name: str¶
column name
- value: Any =
FROM_NAME
¶ value that uniquely identifies a row
By default, will be set to a
ralsei.types.Placeholder
with the same name as the column
Initialization
- property identifier : ralsei.types.primitives.Identifier¶
name
wrapped in a SQL identifier
- to_sql(env: ralsei.jinja.ISqlEnvironment) str ¶