Show / Hide Table of Contents

Class Insert

Query to insert data.

Inheritance
System.Object
BaseInsert
Insert
Implements
IParametrizedQuery
ISqlGenerating
ICacheableQuery
System.ICloneable
IDBCommand
Inherited Members
BaseInsert.Execute()
BaseInsert.Execute(DBExecutor)
BaseInsert.ResetParameters()
BaseInsert.InitializeParameters()
BaseInsert.ResetCachedSqlText()
BaseInsert.SetParameterValue(String, Object)
BaseInsert.DBEngine
BaseInsert.UserConnection
BaseInsert.Source
BaseInsert.Parameters
BaseInsert.HasParameters
BaseInsert.BuildParametersAsValue
BaseInsert.IsCacheEnabled
BaseInsert.CachedSqlText
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public class Insert : BaseInsert, IParametrizedQuery, ISqlGenerating, ICacheableQuery, ICloneable, IDBCommand

Constructors

Insert(Insert)

Initializes a new Insert instance that is a clone of the passed-in query.

Declaration
public Insert(Insert source)
Parameters
Type Name Description
Insert source

The query to add whose clone is being created.

Insert(UserConnection)

Initializes a new Insert instance, using the specified user connection.

Declaration
public Insert(UserConnection userConnection)
Parameters
Type Name Description
UserConnection userConnection

User connection.

Properties

ColumnValues

A collection of query column values.

Declaration
public ModifyQueryColumnValueCollection ColumnValues { get; }
Property Value
Type Description
ModifyQueryColumnValueCollection

ColumnValuesCollection

A collection of query column values for a batch query.

Declaration
public List<ModifyQueryColumnValueCollection> ColumnValuesCollection { get; }
Property Value
Type Description
System.Collections.Generic.List<ModifyQueryColumnValueCollection>

Methods

BuildSqlText(StringBuilder)

Generates the query text, using the specified System.Text.StringBuilder instance.

Declaration
public override void BuildSqlText(StringBuilder sb)
Parameters
Type Name Description
System.Text.StringBuilder sb

The System.Text.StringBuilder instance used to create query text.

Overrides
BaseInsert.BuildSqlText(StringBuilder)

Clone()

Creates the clone of the current Insert instance.

Declaration
public override object Clone()
Returns
Type Description
System.Object

A new Insert instance that is a clone of the current instance.

Overrides
BaseInsert.Clone()

GetSqlText()

Returns the SQL text of the current query.

Declaration
public override string GetSqlText()
Returns
Type Description
System.String

The SQL text of the current query.

Overrides
BaseInsert.GetSqlText()

GetUsingParameters()

Gets the collection of the query parameters.

Declaration
public override QueryParameterCollection GetUsingParameters()
Returns
Type Description
QueryParameterCollection

Collection of the query parameters.

Overrides
BaseInsert.GetUsingParameters()

Into(String)

Adds an INTO clause to the current query that specifies the schema with the given name as the data source for the query.

Declaration
public Insert Into(string schemaName)
Parameters
Type Name Description
System.String schemaName

Name of the schema.

Returns
Type Description
Insert

The current Insert instance.

Into(ModifyQuerySource)

In the current query, adds the INTO statement that sets the passed-in data source as the query data source.

Declaration
public Insert Into(ModifyQuerySource source)
Parameters
Type Name Description
ModifyQuerySource source

Data source.

Returns
Type Description
Insert

The current Insert instance.

Set(String, IQueryColumnExpressionConvertible)

Adds a SET clause to the current query to assign to the column with the specified alias the passed expression.

Declaration
public Insert Set(string sourceColumnAlias, IQueryColumnExpressionConvertible expression)
Parameters
Type Name Description
System.String sourceColumnAlias

The alias of the column.

IQueryColumnExpressionConvertible expression

Expression.

Returns
Type Description
Insert

The current Insert instance.

Set(String, Query)

Adds a SET clause to the current query to assign an expression to a column with a specified alias for an arbitrary subquery.

Declaration
public Insert Set(string sourceColumnAlias, Query subSelectQuery)
Parameters
Type Name Description
System.String sourceColumnAlias

The alias of the column.

Query subSelectQuery

Random subquery.

Returns
Type Description
Insert

The current Insert instance.

Set(String, QueryColumnExpression)

Adds a SET clause to the current query to assign to the column with the specified alias the passed column expression.

Declaration
public Insert Set(string sourceColumnAlias, QueryColumnExpression columnExpression)
Parameters
Type Name Description
System.String sourceColumnAlias

The alias of the column.

QueryColumnExpression columnExpression

The column expression.

Returns
Type Description
Insert

The current Insert instance.

Set(String, QueryParameter)

Adds a SET clause to the current query to assign an expression to the column with the specified alias for the passed parameter.

Declaration
public Insert Set(string sourceColumnAlias, QueryParameter parameter)
Parameters
Type Name Description
System.String sourceColumnAlias

The alias of the column.

QueryParameter parameter

The query parameter.

Returns
Type Description
Insert

The current Insert instance.

Set(String, Select)

In the current query, adds the SET statement that assigns the expression for the passed-in select subquery to the column with the specified alias.

Declaration
public Insert Set(string sourceColumnAlias, Select subSelect)
Parameters
Type Name Description
System.String sourceColumnAlias

The alias of the column.

Select subSelect

The select subquery.

Returns
Type Description
Insert

The current Insert instance.

Values()

Initialize values for batch query.

Declaration
public Insert Values()
Returns
Type Description
Insert

Current instance of Insert class.

Implements

IParametrizedQuery
ISqlGenerating
ICacheableQuery
System.ICloneable
IDBCommand

Extension Methods

ReflectionUtilities.GetPropertyValue(Object, String)
ReflectionUtilities.GetPropertyDefValue(Object, String, Object)
ReflectionUtilities.TryGetPropertyValue(Object, String, out Object)
ReflectionUtilities.HasProperty(Object, String)
ReflectionUtilities.GetPropertyValue(Object, String, BindingFlags)
ReflectionUtilities.GetPropertyValueByPath(Object, String)
ReflectionUtilities.SetPropertyValue(Object, String, Object)
ReflectionUtilities.TrySetPropertyValue(Object, String, Object)
ValidateUtilities.CheckArgumentNull(Object, String)
ValidateUtilities.CheckDependencyNull(Object, String)
ValidateUtilities.EnsureDependencyNotNull<T>(T, String)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance, Boolean)
NSubstituteExtension.Protected(Object, String, Object[])
NSubstituteExtension.Protected(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedProperty(Object, String)
NSubstituteExtension.MatchInstance<T>(T)
SubstituteUtilities.GetIsSubstituteObject(Object)
SubstituteUtilities.Instead<TInstance, TValue>(TInstance, Func<TInstance, TValue>)
Back to top Generated by DocFX