AbstractReadonlynameName of the database
Handle a column schema request. Supports GET (fetch column schema), POST (add column) and DELETE (drop column). PUT is not supported and throws.
HTTP method of the request (GET, POST, DELETE)
name of the table
name of the column (for GET/DELETE)
Optionalbody: stringrequest body as JSON string (for POST)
Handle a table schema request. Supports GET (fetch schema), POST (create table) and DELETE (drop table). PUT is not supported and throws.
HTTP method of the request (GET, POST, DELETE)
name of the table
Optionalbody: stringrequest body as JSON string (for POST)
AbstractgetResolve the optimal native (SQL) type for a serialized field schema. Must throw if the requested internal type / parameter combination is not supported by the database.
serialized field schema
AbstractgetGet the schema fields of a table as OINODataFields (without any API-level field filtering).
name of the table
AbstractgetGet the names of all user (base) tables in the database schema, excluding system tables and views.
Initialize a data model for an API by fetching the schema fields (via getSchemaFields)
and applying API-level field filtering and date-handling parameters.
api which data model to initialize.
AbstractprintPrint a column name using database specific SQL escaping.
name of the column
AbstractprintPrint a database-specific bind-parameter placeholder for the given zero-based parameter index
(e.g. Postgres $1, MySQL/SQLite ?, MSSQL @p0).
zero-based index of the parameter in the statement's ordered value list
Print SQL ADD COLUMN statement.
name of the table
field to add
Print SQL CREATE TABLE statement.
name of the table
fields of the table
Print SQL DROP COLUMN statement.
name of the table
name of the column
Print SQL DROP TABLE statement.
name of the table
Print SQL select statement with DB specific formatting.
The name of the table to select from.
The columns to be selected.
The values to be inserted.
OptionalreturnIdFields: string[]the id fields to return if returnIds is true (if supported by the database)
Print SQL select statement with DB specific formatting.
The name of the table to select from.
The columns to be selected.
The WHERE clause to filter the results.
The ORDER BY clause to sort the results.
The LIMIT clause to limit the number of results.
The GROUP BY clause to group the results.
AbstractprintPrint a table name using database specific SQL escaping.
name of the table
AbstractrunExecute a parameterized statement produced by one of the OINODbDataModel.build*Statement
methods, binding statement.values as database parameters. This is the safe execution path
for statements that contain user-supplied values.
statement (SQL text + ordered bind values) to execute
AbstractsqlExecute other sql operations from a raw SQL string.
NOTE: prefer runStatement (see sqlSelect).
SQL statement.
AbstractsqlExecute a select operation from a raw SQL string.
NOTE: prefer runStatement with a build*Statement-produced OINODbSqlStatement so that
user values are bound as parameters. This raw-string form is kept for schema/DDL and other
internally-constructed SQL.
SQL statement.
Base class for database abstraction, implementing methods for connecting, making queries and parsing/formatting data between SQL and serialization formats.