Helps generate SQL queries for SQLite database operations.
- Namespace
- DbSyncKit
.SQLite - Interfaces
-
- IQueryGenerator
- IDisposable
- Base Types
-
- object
- QueryHelper
graph BT
Type-->Base0["QueryHelper"]
click Base0 "/api/DbSyncKit.DB.Helper/QueryHelper"
Base0-->Base1["object"]
Type-.->Interface0["IQueryGenerator"]
click Interface0 "/api/DbSyncKit.Templates.Interface/IQueryGenerator"
Type-.->Interface1["IDisposable"]
Type["QueryGenerator"]
class Type type-node
Syntax
public class QueryGenerator : QueryHelper, IQueryGenerator, IDisposable
Constructors
Name | Summary |
---|---|
QueryGenerator |
Initializes a new instance of the QueryGenerator class.
|
Methods
Name | Return Value | Summary |
---|---|---|
Dispose |
void |
Performs application-defined tasks associated with freeing, releasing, or resetting resources.
|
EscapeColumn |
string |
Escapes the input column name to be used safely in SQL queries.
|
EscapeValue |
object |
Escapes special characters in the input string to make it SQL-safe.
|
Generate |
string |
Generates a batch separator for SQL queries (not used in this implementation).
|
GenerateComment |
string |
Generates a comment string in either single-line or multi-line format.
|
GenerateDeleteQuery |
string |
Generates a DELETE query based on the provided entity and key columns.
|
GenerateInsertQuery |
string |
Generates an INSERT query based on the provided entity, key columns, and excluded columns.
|
GenerateSelectQuery |
string |
Generates a SELECT query based on the provided table name, list of columns, and schema name.
|
GenerateUpdateQuery |
string |
Generates an UPDATE query based on the provided entity, key columns, excluded columns, and edited properties.
|
GetAllColumns |
List |
Gets the names of all properties for a specified type.
Inherited from QueryHelper
|
Get |
PropertyInfo[] |
Retrieves an array of
System.Reflection.PropertyInfo objects representing the properties that are used for data comparison
in objects of type T.
Inherited from QueryHelper
|
GetCondition |
List |
Generates a SQL WHERE clause based on the specified entity and key columns.
|
GetExcludedColumns |
List |
Gets the names of properties marked as excluded properties for a specified type.
Inherited from QueryHelper
|
GetIdentityColumns |
List |
Retrieves a list of identity columns for a specified data contract type T.
Inherited from QueryHelper
|
Get |
bool |
Gets whether the type specifies to include database-specific SQL statements for identity insert behavior
during insert query generation, considering the GenerateInsertWithIDAttribute if present.
Inherited from QueryHelper
|
GetInsertWithID |
bool |
Gets whether the type specifies to generate an INSERT query with ID, considering the GenerateInsertWithIDAttribute if present.
Inherited from QueryHelper
|
GetKeyColumns |
List |
Gets the names of properties marked as key columns for a specified type.
Inherited from QueryHelper
|
GetKeyProperties |
PropertyInfo[] |
Retrieves an array of
System.Reflection.PropertyInfo objects representing the properties that are used as key properties
for uniquely identifying objects of type T.
Inherited from QueryHelper
|
GetTableName |
string |
Gets the table name of a specified type, considering the TableNameAttribute if present.
Inherited from QueryHelper
|
GetTableSchema |
string |
Gets the table schema of a specified type, considering the TableSchemaAttribute if present.
Inherited from QueryHelper
|