static/jsvm/interfaces/dbx.OciBuilder.html
OciBuilder is the builder for Oracle databases.
addColumnaddForeignKeyaddPrimaryKeyalterColumncreateIndexcreateTablecreateUniqueIndexdbdeletedropColumndropForeignKeydropIndexdropPrimaryKeydropTableexecutorgeneratePlaceholderinsertmodelnewQueryqueryBuilderquotequoteSimpleColumnNamequoteSimpleTableNamerenameColumnrenameTableselecttruncateTableupdateupsert
AddColumn creates a Query that can be used to add a column to a table.
AddForeignKey creates a Query that can be used to add a foreign key constraint to a table. The length of cols and refCols must be the same as they refer to the primary and referential columns. The optional "options" parameters will be appended to the SQL statement. They can be used to specify options such as "ON DELETE CASCADE".
Rest ...options: string[]AddPrimaryKey creates a Query that can be used to specify primary key(s) for a table. The "name" parameter specifies the name of the primary key constraint.
Rest ...cols: string[]AlterColumn creates a Query that can be used to change the definition of a table column.
CreateIndex creates a Query that can be used to create an index for a table.
Rest ...cols: string[]CreateTable creates a Query that represents a CREATE TABLE SQL statement. The keys of cols are the column names, while the values of cols are the corresponding column types. The optional "options" parameters will be appended to the generated SQL statement.
Rest ...options: string[]CreateUniqueIndex creates a Query that can be used to create a unique index for a table.
Rest ...cols: string[]DB returns the DB instance that this builder is associated with.
Delete creates a Query that represents a DELETE SQL statement. If the "where" expression is nil, the DELETE SQL statement will have no WHERE clause (be careful in this case as the SQL statement will delete ALL rows in the table).
DropColumn creates a Query that can be used to drop a column from a table.
DropForeignKey creates a Query that can be used to remove the named foreign key constraint from a table.
DropIndex creates a Query that can be used to remove the named index from a table.
DropPrimaryKey creates a Query that can be used to remove the named primary key constraint from a table.
DropTable creates a Query that can be used to drop a table.
Executor returns the executor object (a DB instance or a transaction) for executing SQL statements.
GeneratePlaceholder generates an anonymous parameter placeholder with the given parameter ID.
Insert creates a Query that represents an INSERT SQL statement. The keys of cols are the column names, while the values of cols are the corresponding column values to be inserted.
Model returns a new ModelQuery object that can be used to perform model-based DB operations. The model passed to this method should be a pointer to a model struct.
NewQuery creates a new Query object with the given SQL statement. The SQL statement may contain parameter placeholders which can be bound with actual parameter values before the statement is executed.
QueryBuilder returns the query builder supporting the current DB.
Quote quotes a string so that it can be embedded in a SQL statement as a string value.
QuoteSimpleColumnName quotes a simple column name. A simple column name does not contain any table prefix.
QuoteSimpleTableName quotes a simple table name. A simple table name does not contain any schema prefix.
RenameColumn creates a Query that can be used to rename a column in a table.
RenameTable creates a Query that can be used to rename a table.
Select returns a new SelectQuery object that can be used to build a SELECT statement. The parameters to this method should be the list column names to be selected. A column name may have an optional alias name. For example, Select("id", "my_name AS name").
Rest ...cols: string[]TruncateTable creates a Query that can be used to truncate a table.
Update creates a Query that represents an UPDATE SQL statement. The keys of cols are the column names, while the values of cols are the corresponding new column values. If the "where" expression is nil, the UPDATE SQL statement will have no WHERE clause (be careful in this case as the SQL statement will update ALL rows in the table).
Upsert creates a Query that represents an UPSERT SQL statement. Upsert inserts a row into the table if the primary key or unique index is not found. Otherwise it will update the row with the new values. The keys of cols are the column names, while the values of cols are the corresponding column values to be inserted.
Rest ...constraints: string[]OSLightDark
Generated using TypeDoc