Helps generate SQL queries for MySQL database operations.
- Namespace
- DbSyncKit
.MySQL - Interfaces
-
- IQueryGenerator
- IDisposable
- Base Types
-
- object
- QueryHelper
Syntax
public class QueryGenerator : QueryHelper, IQueryGenerator, IDisposableConstructors
| Name | Summary |
|---|---|
| QueryGenerator |
Initializes a new instance of the System.Text.StringBuilder class.
|
Methods
| Name | Return Value | Summary |
|---|---|---|
| Dispose |
void |
Performs application-defined tasks associated with freeing, releasing, or resetting resources.
|
| EscapeColumn |
string |
Escapes a column name with backticks for MySQL.
|
| EscapeValue |
object |
Escapes a value to be safely used in a SQL query.
|
| Generate |
string |
Generates a batch separator for SQL queries (not used in this implementation).
|
| GenerateComment |
string |
Generates a comment for SQL queries.
|
| GenerateDeleteQuery |
string |
Generates a delete query for a given entity and key columns.
|
| GenerateInsertQuery |
string |
Generates an insert query for a given entity, key columns, and excluded columns.
|
| GenerateSelectQuery |
string |
Generates a select query for a given entity and columns.
|
| GenerateUpdateQuery |
string |
Generates an update query for a given 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 condition for a given 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
|