SqlBuilderBase Class
.NET Standard 2.x
The abstract base class of a SqlBuilder
object.
Namespace: SnapObjects.Data
Assembly: SnapObjects.Data.dll
Implements
Syntax
public abstract class SqlBuilderBase : ISqlBuilder
Constructors
Name | Description |
---|---|
SqlBuilderBase(string name) | Initializes a new instance of the SqlBuilderBase class. |
Properties
Name | Return Type | Description |
---|---|---|
Name | string | Gets the name of the current object. |
SqlType | SqlStatementType | Gets the SQL statement type of the current object. |
UsedParameters | IReadOnlyDictionary<string, ISqlParameter> | Gets an IReadOnlyDictionary<string, ISqlParameter> object that contains all parameters used in the current object. |
Methods
Name | Return Type | Description |
---|---|---|
AddParameters(params ISqlParameter[] parameters) | bool | Adds the parameters which will be used in the SQL statement to the current object. |
Clone() | ISqlBuilder | Makes a copy of the current ISqlBuilder object. |
GetParameterPlacehold(string name) | string | Gets the placeholder string for a SQL parameter. |
Reset() | ISqlBuilder | Clears the SQL statement and all of the SQL parameters defined in the current object. |
ToReadOnly() | ISqlReadOnlyBuilder | Gets a read-only ISqlReadOnlyBuilder object generated by the clone of the current object. |
ToSqlString(DataContext context) | string | Returns the raw SQL string for the corresponding database by the current object. |
Validate(DataContext context, bool throwError = true) | bool | Validates the raw SQL string for the specified database generated by the current sqlbuilder. |