|
Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
|
SQLite-specific SQL dialect. More...
#include <sql_dialect.h>


Public Member Functions | |
| std::string | placeholder (int index) const override |
| Generate parameter placeholder. | |
| std::string | quote_identifier (std::string_view name) const override |
| Quote an identifier (table or column name) | |
| std::string | escape_string (std::string_view str) const override |
| Escape a string value for safe SQL inclusion. | |
| std::string | returning_clause (std::string_view column="") const override |
| Generate RETURNING clause for INSERT/UPDATE. | |
| std::string | upsert_clause (const std::vector< std::string > &conflict_columns, const std::vector< std::string > &update_columns) const override |
| Generate UPSERT (INSERT OR UPDATE) clause. | |
| std::string | limit_clause (size_t limit, size_t offset) const override |
| Generate LIMIT clause. | |
| std::string | auto_increment () const override |
| Get auto-increment column definition. | |
| std::string | current_timestamp () const override |
| Get current timestamp function. | |
| std::string | concat_operator () const override |
| Get string concatenation operator. | |
| bool | supports_feature (const std::string &feature) const override |
| Check if database supports specific feature. | |
Public Member Functions inherited from database::query::sql_dialect | |
| virtual | ~sql_dialect ()=default |
Additional Inherited Members | |
Static Public Member Functions inherited from database::query::sql_dialect | |
| static std::unique_ptr< sql_dialect > | create (database_types type) |
| Factory method to create appropriate dialect. | |
SQLite-specific SQL dialect.
Definition at line 175 of file sql_dialect.h.
|
overridevirtual |
Get auto-increment column definition.
Examples:
Implements database::query::sql_dialect.
Definition at line 204 of file sql_dialect.cpp.
|
overridevirtual |
Get string concatenation operator.
Examples:
Implements database::query::sql_dialect.
Definition at line 212 of file sql_dialect.cpp.
|
overridevirtual |
Get current timestamp function.
Examples:
Implements database::query::sql_dialect.
Definition at line 208 of file sql_dialect.cpp.
|
overridevirtual |
Escape a string value for safe SQL inclusion.
| str | The string to escape |
Implements database::query::sql_dialect.
Definition at line 147 of file sql_dialect.cpp.
|
overridevirtual |
Generate LIMIT clause.
| limit | Maximum number of rows |
| offset | Number of rows to skip |
Examples:
Implements database::query::sql_dialect.
Definition at line 196 of file sql_dialect.cpp.
|
overridevirtual |
Generate parameter placeholder.
| index | 1-based parameter index |
Examples:
Implements database::query::sql_dialect.
Definition at line 128 of file sql_dialect.cpp.
|
overridevirtual |
Quote an identifier (table or column name)
| name | The identifier to quote |
Examples:
Implements database::query::sql_dialect.
Definition at line 132 of file sql_dialect.cpp.
Referenced by returning_clause(), and upsert_clause().

|
overridevirtual |
Generate RETURNING clause for INSERT/UPDATE.
| column | The column to return (empty for all) |
Examples:
Implements database::query::sql_dialect.
Definition at line 160 of file sql_dialect.cpp.
References quote_identifier().

|
overridevirtual |
Check if database supports specific feature.
| feature | Feature name |
Implements database::query::sql_dialect.
Definition at line 216 of file sql_dialect.cpp.
|
overridevirtual |
Generate UPSERT (INSERT OR UPDATE) clause.
| conflict_columns | Columns that define conflict |
| update_columns | Columns to update on conflict |
Examples:
Implements database::query::sql_dialect.
Definition at line 168 of file sql_dialect.cpp.
References quote_identifier().
