Show / Hide Table of Contents

Class CommandBuilderBase

Provides base and common functionality for all kind of command builders.

Inheritance
System.Object
CommandBuilderBase
CqlCommandBuilderBase
MySqlCommandBuilderBase
PostgreSqlDeleteCommandBuilder
PostgreSqlInsertCommandBuilder
PostgreSqlSelectCommandBuilder
PostgreSqlSelectOneCommandBuilder
PostgreSqlUpdateCommandBuilder
SqlDeleteCommandBuilder
SqlInsertCommandBuilder
SqlSelectCommandBuilder
SqlSelectOneCommandBuilder
SqlUpdateCommandBuilder
Implements
ICommandBuilder
IDisposable
Namespace: Paradigm.ORM.Data.CommandBuilders
Assembly: Paradigm.ORM.Data.dll
Syntax
public abstract class CommandBuilderBase : object, ICommandBuilder, IDisposable

Constructors

| Improve this Doc View Source

CommandBuilderBase(IDatabaseConnector, ITableDescriptor)

Initializes a new instance of the CommandBuilderBase class.

Declaration
protected CommandBuilderBase(IDatabaseConnector connector, ITableDescriptor descriptor)
Parameters
Type Name Description
IDatabaseConnector connector

A database connector.

ITableDescriptor descriptor

A table type descriptor.

Properties

| Improve this Doc View Source

Command

Gets the command instance.

Declaration
protected IDatabaseCommand Command { get; set; }
Property Value
Type Description
IDatabaseCommand
| Improve this Doc View Source

Connector

Gets the current database connector.

Declaration
protected IDatabaseConnector Connector { get; }
Property Value
Type Description
IDatabaseConnector
| Improve this Doc View Source

Descriptor

Gets the table descriptor related with the command builder.

Declaration
protected ITableDescriptor Descriptor { get; }
Property Value
Type Description
ITableDescriptor
Remarks

Command builders are related and constructed arround a given type, and the ORM uses TableDescriptor to gain contextual information about the table.

| Improve this Doc View Source

FormatProvider

Gets the command format provider related to the current connector.

Declaration
protected ICommandFormatProvider FormatProvider { get; }
Property Value
Type Description
ICommandFormatProvider

Methods

| Improve this Doc View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
| Improve this Doc View Source

GetDbParameterNames(IEnumerable<IColumnDescriptor>, String)

Gets a string by joining all the property names, separated by a comma or a provided separator.

Declaration
protected virtual string GetDbParameterNames(IEnumerable<IColumnDescriptor> columns, string separator = ",")
Parameters
Type Name Description
IEnumerable<IColumnDescriptor> columns

Array of column property descriptors.

System.String separator

String separator. Comma is the default character used if no other is provided.

Returns
Type Description
System.String

A string with all the parameter names.

Examples

@param1,@param2,@param3,...,@paramN

| Improve this Doc View Source

GetDbParameterNamesAndValues(IEnumerable<IColumnDescriptor>, String)

Gets a string by joining all the property name and values, separated by comma or a provided separator.

Declaration
protected virtual string GetDbParameterNamesAndValues(IEnumerable<IColumnDescriptor> columns, string separator = ",")
Parameters
Type Name Description
IEnumerable<IColumnDescriptor> columns

Array of column property descriptors.

System.String separator

String separator. Comma is the default character used if no other is provided.

Returns
Type Description
System.String
Examples

@param1=&apos;value1&apos;,@param2=&apos;value2&apos;,@param3=&apos;value3&apos;,...,@paramN=&apos;value4&apos;

| Improve this Doc View Source

GetPropertyNames()

Gets all the property names separated wht commas and scaped.

Declaration
protected virtual string GetPropertyNames()
Returns
Type Description
System.String

All the property names.

| Improve this Doc View Source

GetPropertyNames(IEnumerable<IColumnDescriptor>)

Gets all the property names separated wht commas and scaped.

Declaration
protected virtual string GetPropertyNames(IEnumerable<IColumnDescriptor> descriptors)
Parameters
Type Name Description
IEnumerable<IColumnDescriptor> descriptors

Array of column property descriptors.

Returns
Type Description
System.String

All the property names.

| Improve this Doc View Source

GetTableName()

Gets the name of the table already scaped.

Declaration
protected virtual string GetTableName()
Returns
Type Description
System.String

The name of the table.

| Improve this Doc View Source

PopulateParameters()

Populates the command parameters using the collection of columns of the table type descriptor.

Declaration
protected virtual void PopulateParameters()
| Improve this Doc View Source

PopulateParameters(IEnumerable<IColumnDescriptor>)

Populates the command parameters using the collection of columns.

Declaration
protected virtual void PopulateParameters(IEnumerable<IColumnDescriptor> columns)
Parameters
Type Name Description
IEnumerable<IColumnDescriptor> columns

Array of column property descriptors

Implements

ICommandBuilder
IDisposable

Extension Methods

ObjectExtensions.ThrowIfFails<TException>(Object, Action, String)
ObjectExtensions.ThrowIfFails<TException, TResult>(Object, Func<TResult>, String)
ObjectExtensions.ThrowIfFailsAsync<TException>(Object, Func<Task>, String)
ObjectExtensions.ThrowIfFailsAsync<TException, TResult>(Object, Func<Task<TResult>>, String)
  • Improve this Doc
  • View Source
Powered by MiracleDevs ©2017. Code licensed under the MIT License.
Documentation generated by DocFX.