@onzag/itemize / Modules / database/CreateTableBuilder / CreateTableBuilder
database/CreateTableBuilder.CreateTableBuilder
Reprents the basic query builder to build a bit of a query or the entire query itself and this class is supposed to be extended by other builders
-
↳
CreateTableBuilder
- addBindingSource
- addBindingSources
- addColumn
- clear
- clearBindingSources
- compile
- getBindings
- ifNotExists
- popBindingSource
- shiftBindingSource
- shiftBindingSources
- table
- toSQL
• new CreateTableBuilder(): CreateTableBuilder
Builds a new create table query builder
database/CreateTableBuilder.ts:37
• Private columns: ICreateTableColumnDataWithExpressionAsDefault[] = []
database/CreateTableBuilder.ts:32
• Private createIfNotExists: boolean
database/CreateTableBuilder.ts:31
• Private tableName: string
Table name in question we are updating against
database/CreateTableBuilder.ts:30
▸ addBindingSource(value): void
Adds a binding source to the binding source list in order
| Name | Type | Description |
|---|---|---|
value |
ExtendedBindingType |
the binding source to add |
void
▸ addBindingSources(values): void
Adds many binding sources to the bindings sources list
| Name | Type | Description |
|---|---|---|
values |
ExtendedBindingType[] |
the binding sources to add |
void
QueryBuilder.addBindingSources
▸ addColumn(info): CreateTableBuilder
Adds a column to the create rule
| Name | Type | Description |
|---|---|---|
info |
ICreateTableColumnData |
the info about the column |
itself
database/CreateTableBuilder.ts:48
▸ clear(): CreateTableBuilder
Clears the table name, if not exists state and columns
itself
database/CreateTableBuilder.ts:93
▸ clearBindingSources(): void
Removes all binding sources
void
QueryBuilder.clearBindingSources
▸ compile(): string
Converts this from query to a pseudo SQL query that uses ?
string
a string that represents the compiled result
database/CreateTableBuilder.ts:105
▸ getBindings(): BasicBindingType[]
Provides the bindings for the query in order that should match the compilation
a list of basic bindings
▸ ifNotExists(): CreateTableBuilder
Makes the update be IF NOT EXISTS
itself
database/CreateTableBuilder.ts:84
▸ popBindingSource(): ExtendedBindingType
Removes the last added biding source and returns it
▸ shiftBindingSource(value): void
Adds a binding source at the start of the bindings source list
| Name | Type | Description |
|---|---|---|
value |
ExtendedBindingType |
the binding source to add |
void
QueryBuilder.shiftBindingSource
▸ shiftBindingSources(values): void
Adds many binding sources at the start of the bindings source list
| Name | Type | Description |
|---|---|---|
values |
ExtendedBindingType[] |
the binding sources to add |
void
QueryBuilder.shiftBindingSources
▸ table(tableName): CreateTableBuilder
Specifies the table we are updating
| Name | Type | Description |
|---|---|---|
tableName |
string |
the table in question |
itself
database/CreateTableBuilder.ts:75
▸ toSQL(): IQueryBuilderSQLResult
Returns the SQL result for usage in the query builder
IQueryBuilderSQLResult
a sql builder result with the bindings and the query itself