SelectBuilderBase class abstract

Available extensions

Constructors

SelectBuilderBase.new({required String primaryTableKey, required SupabaseTableInfo currentTableInfo, String tableAlias = 't0'})
Constructs a SelectBuilderBase.

Properties

currentTableInfo SupabaseTableInfo
Schema information for the primary table this builder operates on.
final
hashCode int
The hash code for this object.
no setterinherited
primaryTableKey String
The unique key (often primary key name) of the primary table for this builder. Example: 'id'.
final
primaryTableName String
Gets the original database name of the primary table.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectAllPrimary bool
If true, all columns (*) from the primary table will be selected. If false, only columns listed in selectedPrimaryColumns (or default PKs if that's empty) will be selected.
getter/setter pair
selectedPrimaryColumns Set<String>
A set of specific column names (database names) to be selected from the primary table. If selectAllPrimary is true, this set is ignored for the primary table's columns.
final
supabaseRelatedBuilders Map<String, RelatedBuilderLink>
Stores related builders, keyed by the desired JSON key for the output in the parent object. For example, {'author': RelatedBuilderLink(...), 'comments': RelatedBuilderLink(...)}.
final
tableAlias String
The alias for the primary table in SQL queries (e.g., 't0').
final

Methods

addSupabaseRelated({required String jsonKey, required String fkConstraintName, required SelectBuilderBase nestedBuilder, bool innerJoin = false}) → void
Adds a related table to the select query.
buildSelectWithNestedData() SqlStatement
Builds an SQLite SqlStatement to select data from the primary table and its related tables, constructing a nested JSON structure similar to what Supabase PostgREST would return.
buildSupabase() String
Builds the Supabase PostgREST-compatible select string.
getAliasForTable(String tableName) String?

Available on SelectBuilderBase, provided by the SelectBuilderBaseAlias extension

Returns the table alias for the main table being selected.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
selectAll<T extends SelectBuilderBase>() → T
Configures this builder to select all columns (*) from its primary table.
selectSupabaseColumns<T extends SelectBuilderBase>(List<String> dbColumnNames) → T
Configures this builder to select a specific list of columns from its primary table.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited