duckdb_ast.models ================= .. py:module:: duckdb_ast.models Classes ------- .. autoapisummary:: duckdb_ast.models.AggregateHandling duckdb_ast.models.Base duckdb_ast.models.BaseExpression duckdb_ast.models.BaseTableRef duckdb_ast.models.BetweenExpression duckdb_ast.models.CaseCheck duckdb_ast.models.CaseExpression duckdb_ast.models.CastExpression duckdb_ast.models.CatalogEntry duckdb_ast.models.CollateExpression duckdb_ast.models.ColumnRefExpression duckdb_ast.models.CommonTableExpressionInfo duckdb_ast.models.CommonTableExpressionMap duckdb_ast.models.ComparisonExpression duckdb_ast.models.ConjunctionExpression duckdb_ast.models.ConstantExpression duckdb_ast.models.DecimalTypeInfo duckdb_ast.models.DistinctModifier duckdb_ast.models.EmptyTableRef duckdb_ast.models.ErrorResponse duckdb_ast.models.ExpressionType duckdb_ast.models.ExtraTypeInfo duckdb_ast.models.FunctionExpression duckdb_ast.models.JoinRef duckdb_ast.models.LambdaExpression duckdb_ast.models.LimitModifier duckdb_ast.models.LimitPercentModifier duckdb_ast.models.ListTypeInfo duckdb_ast.models.LogicalType duckdb_ast.models.LogicalTypeId duckdb_ast.models.OperatorExpression duckdb_ast.models.OrderByNode duckdb_ast.models.OrderByNullType duckdb_ast.models.OrderModifier duckdb_ast.models.OrderType duckdb_ast.models.OrderedDict duckdb_ast.models.Pair duckdb_ast.models.ParameterExpression duckdb_ast.models.ParsedExpression duckdb_ast.models.ParsedExpressionSubclasses duckdb_ast.models.PositionalReferenceExpression duckdb_ast.models.QueryNode duckdb_ast.models.QueryNodeSubclasses duckdb_ast.models.RecursiveCTENode duckdb_ast.models.ResultModifier duckdb_ast.models.ResultModifierSubclasses duckdb_ast.models.Root duckdb_ast.models.SampleMethod duckdb_ast.models.SampleOptions duckdb_ast.models.SelectNode duckdb_ast.models.SelectStatement duckdb_ast.models.SetOperationNode duckdb_ast.models.StandardEntry duckdb_ast.models.StarExpression duckdb_ast.models.StatementType duckdb_ast.models.StructTypeInfo duckdb_ast.models.SubqueryExpression duckdb_ast.models.SubqueryRef duckdb_ast.models.SuccessResponse duckdb_ast.models.TableFunctionRef duckdb_ast.models.TableRef duckdb_ast.models.TableRefSubclasses duckdb_ast.models.TypeCatalogEntry duckdb_ast.models.UserTypeInfo duckdb_ast.models.Value duckdb_ast.models.WindowBoundary duckdb_ast.models.WindowExpression Module Contents --------------- .. py:class:: AggregateHandling Bases: :py:obj:`enum.Enum` .. gh_link:: src/include/duckdb/common/enums/aggregate_handling.hpp#L16 .. py:attribute:: FORCE_AGGREGATES :value: 'FORCE_AGGREGATES' .. py:attribute:: NO_AGGREGATES_ALLOWED :value: 'NO_AGGREGATES_ALLOWED' .. py:attribute:: STANDARD_HANDLING :value: 'STANDARD_HANDLING' .. py:class:: Base(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Base model with config .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:attribute:: query_location :type: Optional[int] :value: None .. py:class:: BaseExpression(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/base_expression.hpp#L18 .. py:attribute:: alias :type: str .. py:attribute:: clazz :type: str .. py:attribute:: type :type: str .. py:class:: BaseTableRef(/, **data: Any) Bases: :py:obj:`TableRef` .. gh_link:: src/include/duckdb/parser/tableref/basetableref.hpp#L16 .. py:attribute:: catalog_name :type: str .. py:attribute:: column_name_alias :type: Optional[list[str]] :value: None .. py:attribute:: schema_name :type: str .. py:attribute:: table_name :type: str .. py:attribute:: type :type: Literal['BASE_TABLE'] .. py:class:: BetweenExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/between_expression.hpp#L15 .. py:attribute:: clazz :type: Literal['BETWEEN'] .. py:attribute:: input :type: ParsedExpressionSubclasses .. py:attribute:: lower :type: ParsedExpressionSubclasses .. py:attribute:: type :type: Literal['COMPARE_BETWEEN'] .. py:attribute:: upper :type: ParsedExpressionSubclasses .. py:class:: CaseCheck(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/expression/case_expression.hpp#L16 .. py:attribute:: then_expr :type: ParsedExpressionSubclasses .. py:attribute:: when_expr :type: ParsedExpressionSubclasses .. py:class:: CaseExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/case_expression.hpp#L25 .. py:attribute:: case_checks :type: list[CaseCheck] .. py:attribute:: clazz :type: Literal['CASE'] .. py:attribute:: else_expr :type: ParsedExpressionSubclasses .. py:attribute:: type :type: Literal['CASE_EXPR'] .. py:class:: CastExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/cast_expression.hpp#L17 .. py:attribute:: cast_type :type: LogicalType .. py:attribute:: child :type: ParsedExpressionSubclasses .. py:attribute:: clazz :type: Literal['CAST'] .. py:attribute:: try_cast :type: bool .. py:attribute:: type :type: Literal['OPERATOR_CAST'] .. py:class:: CatalogEntry(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/catalog/catalog_entry.hpp#L25 .. py:class:: CollateExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/collate_expression.hpp#L16 .. py:attribute:: child :type: ParsedExpressionSubclasses .. py:attribute:: clazz :type: Literal['COLLATE'] .. py:attribute:: collation :type: str .. py:attribute:: type :type: Literal['COLLATE'] .. py:class:: ColumnRefExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/columnref_expression.hpp#L18 .. py:attribute:: clazz :type: Literal['COLUMN_REF'] .. py:attribute:: column_names :type: list[str] .. py:attribute:: type :type: Literal['COLUMN_REF'] .. py:class:: CommonTableExpressionInfo(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/common_table_expression_info.hpp#L18 .. py:attribute:: aliases :type: list[str] .. py:attribute:: materialized :type: Literal['CTE_MATERIALIZE_DEFAULT', 'CTE_MATERIALIZE_ALWAYS', 'CTE_MATERIALIZE_NEVER'] .. py:attribute:: query :type: SelectStatement .. py:class:: CommonTableExpressionMap(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/query_node.hpp#L32 .. py:attribute:: map :type: OrderedDict[str, CommonTableExpressionInfo] .. py:class:: ComparisonExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/comparison_expression.hpp#L16 .. py:attribute:: clazz :type: Literal['COMPARISON'] .. py:attribute:: left :type: ParsedExpressionSubclasses .. py:attribute:: right :type: ParsedExpressionSubclasses .. py:attribute:: type :type: Literal['COMPARE_GREATERTHAN', 'COMPARE_EQUAL', 'COMPARE_EQUAL', 'COMPARE_NOTEQUAL', 'COMPARE_GREATERTHANOREQUALTO', 'COMPARE_NOT_DISTINCT_FROM', 'COMPARE_DISTINCT_FROM', 'COMPARE_LESSTHANOREQUALTO', 'COMPARE_LESSTHAN'] .. py:class:: ConjunctionExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/conjunction_expression.hpp#L17 .. py:attribute:: children :type: list[ParsedExpressionSubclasses] .. py:attribute:: clazz :type: Literal['CONJUNCTION'] .. py:attribute:: type :type: Literal['CONJUNCTION_AND', 'CONJUNCTION_OR'] .. py:class:: ConstantExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/constant_expression.hpp#L17 .. py:attribute:: clazz :type: Literal['CONSTANT'] .. py:attribute:: type :type: Literal['VALUE_CONSTANT'] .. py:attribute:: value :type: Value .. py:class:: DecimalTypeInfo(/, **data: Any) Bases: :py:obj:`ExtraTypeInfo` .. gh_link:: src/include/duckdb/common/extra_type_info.hpp#L66 .. py:attribute:: scale :type: int .. py:attribute:: type :type: Literal['DECIMAL_TYPE_INFO'] .. py:attribute:: width :type: int .. py:class:: DistinctModifier(/, **data: Any) Bases: :py:obj:`ResultModifier` .. gh_link:: src/include/duckdb/parser/result_modifier.hpp#L144 .. py:attribute:: distinct_on_targets :type: list[ParsedExpressionSubclasses] .. py:attribute:: type :type: Literal['DISTINCT_MODIFIER'] .. py:class:: EmptyTableRef(/, **data: Any) Bases: :py:obj:`TableRef` .. gh_link:: src/include/duckdb/parser/tableref/emptytableref.hpp#L15 .. py:attribute:: type :type: Literal['EMPTY'] .. py:class:: ErrorResponse(/, **data: Any) Bases: :py:obj:`Base` Error shape for when parsing fails .. py:attribute:: error :type: Literal[True] .. py:attribute:: error_message :type: str .. py:attribute:: error_subtype :type: Optional[str] :value: None .. py:attribute:: error_type :type: str .. py:attribute:: position :type: Optional[int] :value: None .. py:class:: ExpressionType Bases: :py:obj:`enum.Enum` .. gh_link:: src/include/duckdb/common/enums/expression_type.hpp#L18 .. py:attribute:: AGGREGATE :value: 'AGGREGATE' .. py:attribute:: ARRAY_CONSTRUCTOR :value: 'ARRAY_CONSTRUCTOR' .. py:attribute:: ARRAY_EXTRACT :value: 'ARRAY_EXTRACT' .. py:attribute:: ARRAY_SLICE :value: 'ARRAY_SLICE' .. py:attribute:: ARROW :value: 'ARROW' .. py:attribute:: BOUND_AGGREGATE :value: 'BOUND_AGGREGATE' .. py:attribute:: BOUND_COLUMN_REF :value: 'BOUND_COLUMN_REF' .. py:attribute:: BOUND_FUNCTION :value: 'BOUND_FUNCTION' .. py:attribute:: BOUND_LAMBDA_REF :value: 'BOUND_LAMBDA_REF' .. py:attribute:: BOUND_REF :value: 'BOUND_REF' .. py:attribute:: BOUND_UNNEST :value: 'BOUND_UNNEST' .. py:attribute:: CASE_EXPR :value: 'CASE_EXPR' .. py:attribute:: CAST :value: 'CAST' .. py:attribute:: COLLATE :value: 'COLLATE' .. py:attribute:: COLUMN_REF :value: 'COLUMN_REF' .. py:attribute:: COMPARE_BETWEEN :value: 'COMPARE_BETWEEN' .. py:attribute:: COMPARE_BOUNDARY_END :value: 'COMPARE_BOUNDARY_END' .. py:attribute:: COMPARE_BOUNDARY_START :value: 'COMPARE_BOUNDARY_START' .. py:attribute:: COMPARE_DISTINCT_FROM :value: 'COMPARE_DISTINCT_FROM' .. py:attribute:: COMPARE_EQUAL :value: 'COMPARE_EQUAL' .. py:attribute:: COMPARE_GREATERTHAN :value: 'COMPARE_GREATERTHAN' .. py:attribute:: COMPARE_GREATERTHANOREQUALTO :value: 'COMPARE_GREATERTHANOREQUALTO' .. py:attribute:: COMPARE_IN :value: 'COMPARE_IN' .. py:attribute:: COMPARE_LESSTHAN :value: 'COMPARE_LESSTHAN' .. py:attribute:: COMPARE_LESSTHANOREQUALTO :value: 'COMPARE_LESSTHANOREQUALTO' .. py:attribute:: COMPARE_NOTEQUAL :value: 'COMPARE_NOTEQUAL' .. py:attribute:: COMPARE_NOT_BETWEEN :value: 'COMPARE_NOT_BETWEEN' .. py:attribute:: COMPARE_NOT_DISTINCT_FROM :value: 'COMPARE_NOT_DISTINCT_FROM' .. py:attribute:: COMPARE_NOT_IN :value: 'COMPARE_NOT_IN' .. py:attribute:: CONJUNCTION_AND :value: 'CONJUNCTION_AND' .. py:attribute:: CONJUNCTION_OR :value: 'CONJUNCTION_OR' .. py:attribute:: FUNCTION :value: 'FUNCTION' .. py:attribute:: FUNCTION_REF :value: 'FUNCTION_REF' .. py:attribute:: GROUPING_FUNCTION :value: 'GROUPING_FUNCTION' .. py:attribute:: INVALID :value: 'INVALID' .. py:attribute:: LAMBDA :value: 'LAMBDA' .. py:attribute:: OPERATOR_CAST :value: 'OPERATOR_CAST' .. py:attribute:: OPERATOR_COALESCE :value: 'OPERATOR_COALESCE' .. py:attribute:: OPERATOR_IS_NOT_NULL :value: 'OPERATOR_IS_NOT_NULL' .. py:attribute:: OPERATOR_IS_NULL :value: 'OPERATOR_IS_NULL' .. py:attribute:: OPERATOR_NOT :value: 'OPERATOR_NOT' .. py:attribute:: OPERATOR_NULLIF :value: 'OPERATOR_NULLIF' .. py:attribute:: PLACEHOLDER :value: 'PLACEHOLDER' .. py:attribute:: POSITIONAL_REFERENCE :value: 'POSITIONAL_REFERENCE' .. py:attribute:: STAR :value: 'STAR' .. py:attribute:: STRUCT_EXTRACT :value: 'STRUCT_EXTRACT' .. py:attribute:: SUBQUERY :value: 'SUBQUERY' .. py:attribute:: TABLE_REF :value: 'TABLE_REF' .. py:attribute:: TABLE_STAR :value: 'TABLE_STAR' .. py:attribute:: VALUE_CONSTANT :value: 'VALUE_CONSTANT' .. py:attribute:: VALUE_DEFAULT :value: 'VALUE_DEFAULT' .. py:attribute:: VALUE_NULL :value: 'VALUE_NULL' .. py:attribute:: VALUE_PARAMETER :value: 'VALUE_PARAMETER' .. py:attribute:: VALUE_SCALAR :value: 'VALUE_SCALAR' .. py:attribute:: VALUE_TUPLE :value: 'VALUE_TUPLE' .. py:attribute:: VALUE_TUPLE_ADDRESS :value: 'VALUE_TUPLE_ADDRESS' .. py:attribute:: VALUE_VECTOR :value: 'VALUE_VECTOR' .. py:attribute:: WINDOW_AGGREGATE :value: 'WINDOW_AGGREGATE' .. py:attribute:: WINDOW_CUME_DIST :value: 'WINDOW_CUME_DIST' .. py:attribute:: WINDOW_FIRST_VALUE :value: 'WINDOW_FIRST_VALUE' .. py:attribute:: WINDOW_LAG :value: 'WINDOW_LAG' .. py:attribute:: WINDOW_LAST_VALUE :value: 'WINDOW_LAST_VALUE' .. py:attribute:: WINDOW_LEAD :value: 'WINDOW_LEAD' .. py:attribute:: WINDOW_NTH_VALUE :value: 'WINDOW_NTH_VALUE' .. py:attribute:: WINDOW_NTILE :value: 'WINDOW_NTILE' .. py:attribute:: WINDOW_PERCENT_RANK :value: 'WINDOW_PERCENT_RANK' .. py:attribute:: WINDOW_RANK :value: 'WINDOW_RANK' .. py:attribute:: WINDOW_RANK_DENSE :value: 'WINDOW_RANK_DENSE' .. py:attribute:: WINDOW_ROW_NUMBER :value: 'WINDOW_ROW_NUMBER' .. py:class:: ExtraTypeInfo(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/common/extra_type_info.hpp#L31 .. py:attribute:: alias :type: str .. py:attribute:: catalog_entry :type: Optional[TypeCatalogEntry] :value: None .. py:attribute:: modifiers :type: list[Value] .. py:attribute:: type :type: str .. py:class:: FunctionExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/function_expression.hpp#L17 .. py:attribute:: catalog :type: str .. py:attribute:: children :type: list[ParsedExpressionSubclasses] .. py:attribute:: clazz :type: Literal['FUNCTION'] .. py:attribute:: distinct :type: bool .. py:attribute:: export_state :type: bool .. py:attribute:: filter :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: function_name :type: str .. py:attribute:: is_operator :type: bool .. py:attribute:: order_bys :type: OrderModifier .. py:attribute:: schema_name :type: str .. py:attribute:: type :type: Literal['FUNCTION'] .. py:class:: JoinRef(/, **data: Any) Bases: :py:obj:`TableRef` .. gh_link:: src/include/duckdb/parser/tableref/joinref.hpp#L21 .. py:attribute:: condition :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: delim_flipped :type: bool .. py:attribute:: duplicate_eliminated_columns :type: list[str] .. py:attribute:: join_type :type: Literal['INVALID', 'LEFT', 'RIGHT', 'INNER', 'OUTER', 'SEMI', 'ANTI', 'MARK', 'SINGLE'] .. py:attribute:: left :type: TableRefSubclasses .. py:attribute:: ref_type :type: Literal['CROSS', 'ASOF', 'NATURAL', 'REGULAR', 'DEPENDENT', 'POSITIONAL'] .. py:attribute:: right :type: TableRefSubclasses .. py:attribute:: type :type: Literal['JOIN'] .. py:attribute:: using_columns :type: list[str] .. py:class:: LambdaExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/lambda_expression.hpp#L20 .. py:attribute:: clazz :type: Literal['LAMBDA'] .. py:attribute:: expr :type: ParsedExpressionSubclasses .. py:attribute:: lhs :type: ParsedExpressionSubclasses .. py:attribute:: type :type: Literal['LAMBDA'] .. py:class:: LimitModifier(/, **data: Any) Bases: :py:obj:`ResultModifier` .. gh_link:: src/include/duckdb/parser/result_modifier.hpp#L98 .. py:attribute:: limit :type: ParsedExpressionSubclasses .. py:attribute:: offset :type: ParsedExpressionSubclasses .. py:attribute:: type :type: Literal['LIMIT_MODIFIER'] .. py:class:: LimitPercentModifier(/, **data: Any) Bases: :py:obj:`ResultModifier` .. gh_link:: src/include/duckdb/parser/result_modifier.hpp#L165 .. py:attribute:: limit :type: ParsedExpressionSubclasses .. py:attribute:: offset :type: ParsedExpressionSubclasses .. py:attribute:: type :type: Literal['LIMIT_PERCENT_MODIFIER'] .. py:class:: ListTypeInfo(/, **data: Any) Bases: :py:obj:`ExtraTypeInfo` .. gh_link:: src/include/duckdb/common/extra_type_info.hpp#L105 .. py:attribute:: child_type :type: LogicalType .. py:attribute:: type :type: Literal['LIST_TYPE_INFO'] .. py:class:: LogicalType(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/common/types.hpp#L238 .. py:attribute:: id :type: LogicalTypeId .. py:attribute:: type_info :type: Optional[Union[ListTypeInfo, DecimalTypeInfo, UserTypeInfo, StructTypeInfo]] .. py:class:: LogicalTypeId Bases: :py:obj:`enum.Enum` .. gh_link:: src/include/duckdb/common/types.hpp#L185 .. py:attribute:: AGGREGATE_STATE :value: 'AGGREGATE_STATE' .. py:attribute:: ANY :value: 'ANY' .. py:attribute:: BIGINT :value: 'BIGINT' .. py:attribute:: BIT :value: 'BIT' .. py:attribute:: BLOB :value: 'BLOB' .. py:attribute:: BOOLEAN :value: 'BOOLEAN' .. py:attribute:: CHAR :value: 'CHAR' .. py:attribute:: DATE :value: 'DATE' .. py:attribute:: DECIMAL :value: 'DECIMAL' .. py:attribute:: DOUBLE :value: 'DOUBLE' .. py:attribute:: ENUM :value: 'ENUM' .. py:attribute:: FLOAT :value: 'FLOAT' .. py:attribute:: HUGEINT :value: 'HUGEINT' .. py:attribute:: INTEGER :value: 'INTEGER' .. py:attribute:: INTERVAL :value: 'INTERVAL' .. py:attribute:: INVALID :value: 'INVALID' .. py:attribute:: LAMBDA :value: 'LAMBDA' .. py:attribute:: LIST :value: 'LIST' .. py:attribute:: MAP :value: 'MAP' .. py:attribute:: NULL :value: 'NULL' .. py:attribute:: POINTER :value: 'POINTER' .. py:attribute:: SMALLINT :value: 'SMALLINT' .. py:attribute:: STRUCT :value: 'STRUCT' .. py:attribute:: TABLE :value: 'TABLE' .. py:attribute:: TIME :value: 'TIME' .. py:attribute:: TIMESTAMP :value: 'TIMESTAMP' .. py:attribute:: TIMESTAMP_MS :value: 'TIMESTAMP_MS' .. py:attribute:: TIMESTAMP_NS :value: 'TIMESTAMP_NS' .. py:attribute:: TIMESTAMP_SEC :value: 'TIMESTAMP_SEC' .. py:attribute:: TIMESTAMP_TZ :value: 'TIMESTAMP WITH TIME ZONE' .. py:attribute:: TIME_TZ :value: 'TIME_TZ' .. py:attribute:: TINYINT :value: 'TINYINT' .. py:attribute:: UBIGINT :value: 'UBIGINT' .. py:attribute:: UINTEGER :value: 'UINTEGER' .. py:attribute:: UNION :value: 'UNION' .. py:attribute:: UNKNOWN :value: 'UNKNOWN' .. py:attribute:: USER :value: 'USER' .. py:attribute:: USMALLINT :value: 'USMALLINT' .. py:attribute:: UTINYINT :value: 'UTINYINT' .. py:attribute:: UUID :value: 'UUID' .. py:attribute:: VALIDITY :value: 'VALIDITY' .. py:attribute:: VARCHAR :value: 'VARCHAR' .. py:class:: OperatorExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/operator_expression.hpp#L19 .. py:attribute:: children :type: list[ParsedExpressionSubclasses] .. py:attribute:: clazz :type: Literal['OPERATOR'] .. py:attribute:: type :type: Literal['OPERATOR_IS_NULL', 'OPERATOR_IN', 'OPERATOR_NOT', 'OPERATOR_IS_NOT_NULL', 'COMPARE_NOT_IN', 'COMPARE_IN', 'ARRAY_EXTRACT', 'ARRAY_SLICE', 'STRUCT_EXTRACT'] .. py:class:: OrderByNode(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/result_modifier.hpp#L69 .. py:attribute:: expression :type: ParsedExpressionSubclasses .. py:attribute:: null_order :type: OrderByNullType .. py:attribute:: type :type: OrderType .. py:class:: OrderByNullType Bases: :py:obj:`enum.Enum` .. gh_link:: src/include/duckdb/common/enums/order_type.hpp#L18 .. py:attribute:: INVALID :value: 'INVALID' .. py:attribute:: NULLS_FIRST :value: 'NULLS_FIRST' .. py:attribute:: NULLS_LAST :value: 'NULLS_LAST' .. py:attribute:: ORDER_DEFAULT :value: 'ORDER_DEFAULT' .. py:class:: OrderModifier(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/result_modifier.hpp#L121 .. py:attribute:: orders :type: list[OrderByNode] .. py:attribute:: type :type: Literal['ORDER_MODIFIER'] .. py:class:: OrderType Bases: :py:obj:`enum.Enum` .. gh_link:: src/include/duckdb/common/enums/order_type.hpp#L16 .. py:attribute:: ASCENDING :value: 'ASCENDING' .. py:attribute:: DESCENDING :value: 'DESCENDING' .. py:attribute:: INVALID :value: 'INVALID' .. py:attribute:: ORDER_DEFAULT :value: 'ORDER_DEFAULT' .. py:class:: OrderedDict Bases: :py:obj:`pydantic.RootModel`\ [\ :py:obj:`list`\ [\ :py:obj:`Pair`\ [\ :py:obj:`K`\ , :py:obj:`V`\ ]\ ]\ ], :py:obj:`Generic`\ [\ :py:obj:`K`\ , :py:obj:`V`\ ] Abstract base class for generic types. A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:: class Mapping(Generic[KT, VT]): def __getitem__(self, key: KT) -> VT: ... # Etc. This class can then be used as follows:: def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default .. py:class:: Pair(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel`, :py:obj:`Generic`\ [\ :py:obj:`K`\ , :py:obj:`V`\ ] Usage docs: https://docs.pydantic.dev/2.9/concepts/models/ A base class for creating Pydantic models. Attributes: __class_vars__: The names of the class variables defined on the model. __private_attributes__: Metadata about the private attributes of the model. __signature__: The synthesized `__init__` [`Signature`][inspect.Signature] of the model. __pydantic_complete__: Whether model building is completed, or if there are still undefined fields. __pydantic_core_schema__: The core schema of the model. __pydantic_custom_init__: Whether the model has a custom `__init__` function. __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1. __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these. __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models. __pydantic_post_init__: The name of the post-init method for the model, if defined. __pydantic_root_model__: Whether the model is a [`RootModel`][pydantic.root_model.RootModel]. __pydantic_serializer__: The `pydantic-core` `SchemaSerializer` used to dump instances of the model. __pydantic_validator__: The `pydantic-core` `SchemaValidator` used to validate instances of the model. __pydantic_extra__: A dictionary containing extra values, if [`extra`][pydantic.config.ConfigDict.extra] is set to `'allow'`. __pydantic_fields_set__: The names of fields explicitly set during instantiation. __pydantic_private__: Values of private attributes set on the model instance. .. py:attribute:: key :type: K .. py:attribute:: value :type: V .. py:class:: ParameterExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/parameter_expression.hpp#L30 .. py:attribute:: clazz :type: Literal['PARAMETER'] .. py:attribute:: identifier :type: str .. py:attribute:: type :type: Literal['VALUE_PARAMETER'] .. py:class:: ParsedExpression(/, **data: Any) Bases: :py:obj:`BaseExpression` .. gh_link:: src/include/duckdb/parser/parsed_expression.hpp#L34 .. py:class:: ParsedExpressionSubclasses Bases: :py:obj:`pydantic.RootModel`\ [\ :py:obj:`Annotated`\ [\ :py:obj:`Union`\ [\ :py:obj:`FunctionExpression`\ , :py:obj:`ColumnRefExpression`\ , :py:obj:`StarExpression`\ , :py:obj:`ConstantExpression`\ , :py:obj:`CastExpression`\ , :py:obj:`ComparisonExpression`\ , :py:obj:`ConjunctionExpression`\ , :py:obj:`LambdaExpression`\ , :py:obj:`ParameterExpression`\ , :py:obj:`PositionalReferenceExpression`\ , :py:obj:`SubqueryExpression`\ , :py:obj:`OperatorExpression`\ , :py:obj:`CaseExpression`\ , :py:obj:`CollateExpression`\ , :py:obj:`BetweenExpression`\ , :py:obj:`WindowExpression`\ ]\ , :py:obj:`Field`\ (\ :py:obj:`discriminator='type'`\ )\ ]\ ] Union of :class:`ParsedExpression` subclasses .. py:class:: PositionalReferenceExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/positional_reference_expression.hpp#L14 .. py:attribute:: clazz :type: Literal['POSITIONAL_REFERENCE'] .. py:attribute:: index :type: int .. py:attribute:: type :type: Literal['POSITIONAL_REFERENCE'] .. py:class:: QueryNode(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/query_node.hpp#L47 .. py:attribute:: cte_map :type: CommonTableExpressionMap .. py:attribute:: modifiers :type: list[ResultModifierSubclasses] .. py:attribute:: type :type: str .. py:class:: QueryNodeSubclasses Bases: :py:obj:`pydantic.RootModel`\ [\ :py:obj:`Annotated`\ [\ :py:obj:`Union`\ [\ :py:obj:`SelectNode`\ , :py:obj:`SetOperationNode`\ , :py:obj:`CTENode`\ , :py:obj:`RecursiveCTENode`\ ]\ , :py:obj:`Field`\ (\ :py:obj:`discriminator='type'`\ )\ ]\ ] Union of :class:`QueryNode` subclasses .. py:class:: RecursiveCTENode(/, **data: Any) Bases: :py:obj:`QueryNode` .. gh_link:: src/include/duckdb/parser/query_node/recursive_cte_node.hpp#L17 .. py:attribute:: aliases :type: list[str] .. py:attribute:: cte_name :type: str .. py:attribute:: left :type: QueryNodeSubclasses .. py:attribute:: right :type: QueryNodeSubclasses .. py:attribute:: type :type: Literal['RECURSIVE_CTE_NODE'] .. py:attribute:: union_all :type: bool .. py:class:: ResultModifier(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/result_modifier.hpp#L33 .. py:attribute:: type :type: str .. py:class:: ResultModifierSubclasses Bases: :py:obj:`pydantic.RootModel`\ [\ :py:obj:`Annotated`\ [\ :py:obj:`Union`\ [\ :py:obj:`LimitPercentModifier`\ , :py:obj:`DistinctModifier`\ , :py:obj:`LimitModifier`\ , :py:obj:`OrderModifier`\ ]\ , :py:obj:`Field`\ (\ :py:obj:`discriminator='type'`\ )\ ]\ ] Union of :class:`ResultModifier` subclasses .. py:class:: Root Bases: :py:obj:`pydantic.RootModel`\ [\ :py:obj:`Annotated`\ [\ :py:obj:`Union`\ [\ :py:obj:`ErrorResponse`\ , :py:obj:`SuccessResponse`\ ]\ , :py:obj:`Field`\ (\ :py:obj:`discriminator='error'`\ )\ ]\ ] Union of possible responses .. py:class:: SampleMethod Bases: :py:obj:`enum.Enum` .. gh_link:: src/include/duckdb/parser/parsed_data/sample_options.hpp#L18 .. py:attribute:: BERNOULLI_SAMPLE :value: 'Bernoulli' .. py:attribute:: RESERVOIR_SAMPLE :value: 'Reservoir' .. py:attribute:: SYSTEM_SAMPLE :value: 'System' .. py:class:: SampleOptions(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/parsed_data/sample_options.hpp#L23 .. py:attribute:: is_percentage :type: bool .. py:attribute:: method :type: SampleMethod .. py:attribute:: sample_size :type: Value .. py:attribute:: seed :type: int :value: -1 .. py:class:: SelectNode(/, **data: Any) Bases: :py:obj:`QueryNode` .. gh_link:: src/include/duckdb/parser/query_node/select_node.hpp#L22 .. py:attribute:: aggregate_handling :type: Optional[AggregateHandling] :value: None .. py:attribute:: from_table :type: TableRefSubclasses .. py:attribute:: group_expressions :type: Optional[list[ParsedExpressionSubclasses]] :value: None .. py:attribute:: group_sets :type: Optional[list[GroupingSet]] :value: None .. py:attribute:: having :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: qualify :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: sample :type: Optional[SampleOptions] :value: None .. py:attribute:: select_list :type: list[ParsedExpressionSubclasses] .. py:attribute:: type :type: Literal['SELECT_NODE'] .. py:attribute:: where_clause :type: Optional[ParsedExpressionSubclasses] :value: None .. py:class:: SelectStatement(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/statement/select_statement.hpp#L24 .. py:attribute:: node :type: QueryNodeSubclasses .. py:class:: SetOperationNode(/, **data: Any) Bases: :py:obj:`QueryNode` .. gh_link:: src/include/duckdb/parser/query_node/set_operation_node.hpp#L18 .. py:attribute:: left :type: QueryNodeSubclasses .. py:attribute:: right :type: QueryNodeSubclasses .. py:attribute:: setop_all :type: bool :value: True .. py:attribute:: setop_type :type: Literal['NONE', 'UNION', 'EXCEPT', 'INTERSECT', 'UNION_BY_NAME'] .. py:attribute:: type :type: Literal['SET_OPERATION_NODE'] .. py:class:: StandardEntry(/, **data: Any) Bases: :py:obj:`CatalogEntry` .. gh_link:: src/include/duckdb/catalog/standard_entry.hpp#L17 .. py:class:: StarExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/star_expression.hpp#L17 .. py:attribute:: clazz :type: Literal['STAR'] .. py:attribute:: columns :type: bool .. py:attribute:: exclude_list :type: list[str] .. py:attribute:: expr :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: relation_name :type: str .. py:attribute:: replace_list :type: OrderedDict[str, ParsedExpressionSubclasses] .. py:attribute:: type :type: Literal['STAR'] .. py:attribute:: unpacked :type: bool .. py:class:: StatementType Bases: :py:obj:`enum.Enum` .. gh_link:: src/include/duckdb/common/enums/statement_type.hpp#L19 .. py:attribute:: ALTER_STATEMENT :value: 'ALTER_STATEMENT' .. py:attribute:: ANALYZE_STATEMENT :value: 'ANALYZE_STATEMENT' .. py:attribute:: ATTACH_STATEMENT :value: 'ATTACH_STATEMENT' .. py:attribute:: CALL_STATEMENT :value: 'CALL_STATEMENT' .. py:attribute:: COPY_STATEMENT :value: 'COPY_STATEMENT' .. py:attribute:: CREATE_FUNC_STATEMENT :value: 'CREATE_FUNC_STATEMENT' .. py:attribute:: CREATE_STATEMENT :value: 'CREATE_STATEMENT' .. py:attribute:: DELETE_STATEMENT :value: 'DELETE_STATEMENT' .. py:attribute:: DETACH_STATEMENT :value: 'DETACH_STATEMENT' .. py:attribute:: DROP_STATEMENT :value: 'DROP_STATEMENT' .. py:attribute:: EXECUTE_STATEMENT :value: 'EXECUTE_STATEMENT' .. py:attribute:: EXPLAIN_STATEMENT :value: 'EXPLAIN_STATEMENT' .. py:attribute:: EXPORT_STATEMENT :value: 'EXPORT_STATEMENT' .. py:attribute:: EXTENSION_STATEMENT :value: 'EXTENSION_STATEMENT' .. py:attribute:: INSERT_STATEMENT :value: 'INSERT_STATEMENT' .. py:attribute:: INVALID_STATEMENT :value: 'INVALID_STATEMENT' .. py:attribute:: LOAD_STATEMENT :value: 'LOAD_STATEMENT' .. py:attribute:: LOGICAL_PLAN_STATEMENT :value: 'LOGICAL_PLAN_STATEMENT' .. py:attribute:: MULTI_STATEMENT :value: 'MULTI_STATEMENT' .. py:attribute:: PRAGMA_STATEMENT :value: 'PRAGMA_STATEMENT' .. py:attribute:: PREPARE_STATEMENT :value: 'PREPARE_STATEMENT' .. py:attribute:: RELATION_STATEMENT :value: 'RELATION_STATEMENT' .. py:attribute:: SELECT :value: 'SELECT' .. py:attribute:: SELECT_STATEMENT :value: 'SELECT_STATEMENT' .. py:attribute:: SET_STATEMENT :value: 'SET_STATEMENT' .. py:attribute:: SHOW_STATEMENT :value: 'SHOW_STATEMENT' .. py:attribute:: TRANSACTION_STATEMENT :value: 'TRANSACTION_STATEMENT' .. py:attribute:: UPDATE_STATEMENT :value: 'UPDATE_STATEMENT' .. py:attribute:: VACUUM_STATEMENT :value: 'VACUUM_STATEMENT' .. py:attribute:: VARIABLE_SET_STATEMENT :value: 'VARIABLE_SET_STATEMENT' .. py:class:: StructTypeInfo(/, **data: Any) Bases: :py:obj:`ExtraTypeInfo` .. gh_link:: src/include/duckdb/common/extra_type_info.hpp#L124 .. py:attribute:: child_types :type: list[FirstSecond[str, LogicalType]] .. py:attribute:: type :type: Literal['STRUCT_TYPE_INFO'] .. py:class:: SubqueryExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/subquery_expression.hpp#L18 .. py:attribute:: child :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: clazz :type: Literal['SUBQUERY'] .. py:attribute:: comparison_type :type: Literal['INVALID', 'COMPARE_EQUAL'] .. py:attribute:: subquery :type: SelectStatement .. py:attribute:: subquery_type :type: Literal['SCALAR', 'ANY', 'EXISTS', 'INVALID', 'NOT_EXISTS'] .. py:attribute:: type :type: Literal['SUBQUERY'] .. py:class:: SubqueryRef(/, **data: Any) Bases: :py:obj:`TableRef` .. gh_link:: src/include/duckdb/parser/tableref/subqueryref.hpp#L16 .. py:attribute:: column_name_alias :type: list[str] .. py:attribute:: subquery :type: SelectStatement .. py:attribute:: type :type: Literal['SUBQUERY'] .. py:class:: SuccessResponse(/, **data: Any) Bases: :py:obj:`Base` Returned when parsing succeeds .. py:attribute:: error :type: Literal[False] .. py:attribute:: statements :type: list[SelectStatement] .. py:class:: TableFunctionRef(/, **data: Any) Bases: :py:obj:`TableRef` .. gh_link:: src/include/duckdb/parser/tableref/table_function_ref.hpp#L18 .. py:attribute:: column_name_alias :type: Optional[list[str]] :value: None .. py:attribute:: function :type: FunctionExpression .. py:attribute:: type :type: Literal['TABLE_FUNCTION'] .. py:class:: TableRef(/, **data: Any) Bases: :py:obj:`Base` .. gh_link:: src/include/duckdb/parser/tableref.hpp#L20 .. py:attribute:: alias :type: str .. py:attribute:: sample :type: Optional[SampleOptions] :value: None .. py:class:: TableRefSubclasses Bases: :py:obj:`pydantic.RootModel`\ [\ :py:obj:`Annotated`\ [\ :py:obj:`Union`\ [\ :py:obj:`BaseTableRef`\ , :py:obj:`EmptyTableRef`\ , :py:obj:`TableFunctionRef`\ , :py:obj:`SubqueryRef`\ , :py:obj:`JoinRef`\ ]\ , :py:obj:`Field`\ (\ :py:obj:`discriminator='type'`\ )\ ]\ ] Union of :class:`TableRef` subclasses .. py:class:: TypeCatalogEntry(/, **data: Any) Bases: :py:obj:`StandardEntry` .. gh_link:: src/include/duckdb/catalog/catalog_entry/type_catalog_entry.hpp#L18 .. py:attribute:: user_type :type: LogicalType .. py:class:: UserTypeInfo(/, **data: Any) Bases: :py:obj:`ExtraTypeInfo` .. gh_link:: src/include/duckdb/common/extra_type_info.hpp#L163 .. py:attribute:: catalog :type: str .. py:attribute:: schema_name :type: str .. py:attribute:: type :type: Literal['USER_TYPE_INFO'] .. py:attribute:: user_type_modifiers :type: list[Value] .. py:attribute:: user_type_name :type: str .. py:class:: Value(/, **data: Any) Bases: :py:obj:`Base`, :py:obj:`Generic`\ [\ :py:obj:`T`\ ] .. gh_link:: src/include/duckdb/common/types/value.hpp#L30 .. py:attribute:: is_null :type: bool .. py:attribute:: type :type: LogicalType .. py:attribute:: value :type: Optional[T] :value: None .. py:class:: WindowBoundary Bases: :py:obj:`enum.Enum` .. gh_link:: src/include/duckdb/parser/expression/window_expression.hpp#L16 .. py:attribute:: CURRENT_ROW_RANGE :value: 'CURRENT_ROW_RANGE' .. py:attribute:: CURRENT_ROW_ROWS :value: 'CURRENT_ROW_ROWS' .. py:attribute:: EXPR_FOLLOWING_RANGE :value: 'EXPR_FOLLOWING_RANGE' .. py:attribute:: EXPR_FOLLOWING_ROWS :value: 'EXPR_FOLLOWING_ROWS' .. py:attribute:: EXPR_PRECEDING_RANGE :value: 'EXPR_PRECEDING_RANGE' .. py:attribute:: EXPR_PRECEDING_ROWS :value: 'EXPR_PRECEDING_ROWS' .. py:attribute:: INVALID :value: 'INVALID' .. py:attribute:: UNBOUNDED_FOLLOWING :value: 'UNBOUNDED_FOLLOWING' .. py:attribute:: UNBOUNDED_PRECEDING :value: 'UNBOUNDED_PRECEDING' .. py:class:: WindowExpression(/, **data: Any) Bases: :py:obj:`ParsedExpression` .. gh_link:: src/include/duckdb/parser/expression/window_expression.hpp#L35 .. py:attribute:: catalog :type: str .. py:attribute:: children :type: list[ParsedExpressionSubclasses] .. py:attribute:: clazz :type: Literal['WINDOW'] .. py:attribute:: default_expr :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: distinct :type: bool .. py:attribute:: end :type: WindowBoundary .. py:attribute:: end_expr :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: exclude_clause :type: WindowExcludeMode .. py:attribute:: filter_expr :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: function_name :type: str .. py:attribute:: ignore_nulls :type: bool .. py:attribute:: offset_expr :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: orders :type: list[OrderByNode] .. py:attribute:: partitions :type: list[ParsedExpressionSubclasses] .. py:attribute:: schema_name :type: str .. py:attribute:: start :type: WindowBoundary .. py:attribute:: start_expr :type: Optional[ParsedExpressionSubclasses] :value: None .. py:attribute:: type :type: Literal['WINDOW_AGGREGATE', 'WINDOW_ROW_NUMBER', 'WINDOW_FIRST_VALUE', 'WINDOW_LAST_VALUE', 'WINDOW_NTH_VALUE', 'WINDOW_RANK', 'WINDOW_RANK_DENSE', 'WINDOW_PERCENT_RANK', 'WINDOW_CUME_DIST', 'WINDOW_LEAD', 'WINDOW_LAG', 'WINDOW_NTILE']