Class SqliteGenerator
- Namespace
- FluentCommand.Query.Generators
- Assembly
- FluentCommand.dll
Provides a SQL generator for SQLite, implementing SQL statement and expression generation with SQLite-specific syntax and conventions.
public class SqliteGenerator : SqlServerGenerator, IQueryGenerator
- Inheritance
-
SqliteGenerator
- Implements
- Inherited Members
Constructors
SqliteGenerator()
public SqliteGenerator()
Methods
BuildDelete(DeleteStatement)
Builds a SQL DELETE statement for SQLite, including support for FROM, JOIN, WHERE, RETURNING, and comments.
public override string BuildDelete(DeleteStatement deleteStatement)
Parameters
deleteStatement
DeleteStatementThe DeleteStatement containing the DELETE statement configuration.
Returns
- string
A SQL DELETE statement string for SQLite.
Exceptions
- ArgumentException
Thrown if the table is not specified.
BuildInsert(InsertStatement)
Builds a SQL INSERT statement for SQLite, including support for RETURNING and comments.
public override string BuildInsert(InsertStatement insertStatement)
Parameters
insertStatement
InsertStatementThe InsertStatement containing the INSERT statement configuration.
Returns
- string
A SQL INSERT statement string for SQLite.
Exceptions
- ArgumentNullException
Thrown if
insertStatement
isnull
.- ArgumentException
Thrown if the table or values are not specified.
BuildUpdate(UpdateStatement)
Builds a SQL UPDATE statement for SQLite, including support for FROM, JOIN, WHERE, RETURNING, and comments.
public override string BuildUpdate(UpdateStatement updateStatement)
Parameters
updateStatement
UpdateStatementThe UpdateStatement containing the UPDATE statement configuration.
Returns
- string
A SQL UPDATE statement string for SQLite.
Exceptions
- ArgumentException
Thrown if the table or update values are not specified.
LimitExpression(LimitExpression)
Builds a SQL LIMIT/OFFSET expression for SQLite.
public override string LimitExpression(LimitExpression limitExpression)
Parameters
limitExpression
LimitExpressionThe LimitExpression(LimitExpression) representing the limit and offset.
Returns
- string
A SQL LIMIT/OFFSET expression string for SQLite, or an empty string if not applicable.
ParseIdentifier(string)
Parses a quoted identifier and returns the unquoted name for SQLite.
public override string ParseIdentifier(string name)
Parameters
name
stringThe quoted identifier.
Returns
- string
The unquoted identifier name.
QuoteIdentifier(string)
Quotes an identifier (such as a table or column name) for SQLite, using double quotes.
public override string QuoteIdentifier(string name)
Parameters
name
stringThe identifier to quote.
Returns
- string
The quoted identifier, or the original name if quoting is not required.
TableExpression(TableExpression)
Builds a SQL table expression for SQLite, omitting schema (SQLite does not support schema in the same way as SQL Server).
public override string TableExpression(TableExpression tableExpression)
Parameters
tableExpression
TableExpressionThe TableExpression(TableExpression) representing the table.
Returns
- string
A SQL table expression string for SQLite.
Exceptions
- ArgumentNullException
Thrown if
tableExpression
isnull
.