Inherited by Lightweight::SQLiteQueryFormatter.
|
|
| SqlQueryFormatter (SqlQueryFormatter &&)=default |
| |
|
| SqlQueryFormatter (SqlQueryFormatter const &)=default |
| |
|
SqlQueryFormatter & | operator= (SqlQueryFormatter &&)=default |
| |
|
SqlQueryFormatter & | operator= (SqlQueryFormatter const &)=default |
| |
|
virtual std::string_view | BooleanLiteral (bool value) const noexcept=0 |
| | Converts a boolean value to a string literal.
|
| |
|
virtual std::string_view | DateFunction () const noexcept=0 |
| |
|
virtual std::string | StringLiteral (std::string_view value) const noexcept=0 |
| | Converts a string value to a string literal.
|
| |
|
virtual std::string | StringLiteral (char value) const noexcept=0 |
| | Converts a character value to a string literal.
|
| |
|
virtual std::string | BinaryLiteral (std::span< uint8_t const > data) const =0 |
| | Converts a binary value to a hex-encoded string literal.
|
| |
| virtual std::string | QualifiedTableName (std::string_view schema, std::string_view table) const =0 |
| |
| virtual std::string | Insert (std::string_view intoTable, std::string_view fields, std::string_view values) const =0 |
| |
|
virtual std::string | Insert (std::string_view schema, std::string_view intoTable, std::string_view fields, std::string_view values) const =0 |
| |
|
virtual std::string | QueryLastInsertId (std::string_view tableName) const =0 |
| | Retrieves the last insert ID of the given table.
|
| |
|
virtual std::string | SelectAll (bool distinct, std::string_view fields, std::string_view fromTable, std::string_view fromTableAlias, std::string_view tableJoins, std::string_view whereCondition, std::string_view orderBy, std::string_view groupBy) const =0 |
| | Constructs an SQL SELECT query for all rows.
|
| |
|
virtual std::string | SelectFirst (bool distinct, std::string_view fields, std::string_view fromTable, std::string_view fromTableAlias, std::string_view tableJoins, std::string_view whereCondition, std::string_view orderBy, size_t count) const =0 |
| | Constructs an SQL SELECT query for the first row.
|
| |
|
virtual std::string | SelectRange (bool distinct, std::string_view fields, std::string_view fromTable, std::string_view fromTableAlias, std::string_view tableJoins, std::string_view whereCondition, std::string_view orderBy, std::string_view groupBy, std::size_t offset, std::size_t limit) const =0 |
| | Constructs an SQL SELECT query for a range of rows.
|
| |
|
virtual std::string | SelectCount (bool distinct, std::string_view fromTable, std::string_view fromTableAlias, std::string_view tableJoins, std::string_view whereCondition) const =0 |
| | Constructs an SQL SELECT query retrieve the count of rows matching the given condition.
|
| |
|
virtual std::string | Update (std::string_view table, std::string_view tableAlias, std::string_view setFields, std::string_view whereCondition) const =0 |
| | Constructs an SQL UPDATE query.
|
| |
|
virtual std::string | Delete (std::string_view fromTable, std::string_view fromTableAlias, std::string_view tableJoins, std::string_view whereCondition) const =0 |
| | Constructs an SQL DELETE query.
|
| |
|
virtual std::string | ColumnType (SqlColumnTypeDefinition const &type) const =0 |
| | Convert the given column type definition to the SQL type.
|
| |
| virtual StringList | CreateTable (std::string_view schema, std::string_view tableName, std::vector< SqlColumnDeclaration > const &columns, std::vector< SqlCompositeForeignKeyConstraint > const &foreignKeys, bool ifNotExists=false) const =0 |
| |
|
virtual StringList | AlterTable (std::string_view schema, std::string_view tableName, std::vector< SqlAlterTableCommand > const &commands) const =0 |
| | Constructs an SQL ALTER TABLE query.
|
| |
| virtual StringList | DropTable (std::string_view schema, std::string_view const &tableName, bool ifExists=false, bool cascade=false) const =0 |
| |
| virtual std::string | QueryServerVersion () const =0 |
| |
API to format SQL queries for different SQL dialects.
Definition at line 19 of file SqlQueryFormatter.hpp.