Show / Hide Table of Contents

Class InsertFromSelect

Represents an INSERT INTO / SELECT FROM statement, where all of the return fields in the select part are routed into fields in the INSERT target table. Can only be used for non-replicated targets and does not allocate new primary keys.

Inheritance
object
SqlCommand
InsertFromSelect
Inherited Members
SqlCommand.Origin
SqlCommand.AdditionalInfo
SqlCommand.AddIgnoreAutoSentryTableInfo(TableInfo)
SqlCommand.AddIgnoreAutoSentryTableInfo(IEnumerable<TableInfo>)
SqlCommand.RemoveIgnoreAutoSentryTableInfo(TableInfo)
SqlCommand.ClearIgnoreAutoSentryTableInfos()
SqlCommand.IsAutoSentryIgnoredOnTableInfo(TableInfo)
SqlCommand.GetPrivateSaves()
SqlCommand.GetInserts()
SqlCommand.GetUpdates()
SqlCommand.GetDeletes()
SqlCommand.GetSelect()
SqlCommand.AutoSentryIgnoredTables
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public class InsertFromSelect : SqlCommand

Properties

GroupBy

The group-by of the data source

Declaration
public GroupBy GroupBy { get; set; }
Property Value
Type Description
GroupBy

JoinRestriction

The joins of the data source

Declaration
public JoinRestriction JoinRestriction { get; set; }
Property Value
Type Description
JoinRestriction

Restriction

The restriction clause for the data source

Declaration
public Restriction Restriction { get; set; }
Property Value
Type Description
Restriction

SqlType

SqlType: Always IsInsertFromSelect

Declaration
public override SqlType SqlType { get; }
Property Value
Type Description
SqlType
Overrides
SqlCommand.SqlType

TargetTable

TableInfo that identifies the target table

Declaration
public TableInfo TargetTable { get; set; }
Property Value
Type Description
TableInfo

Methods

AddFieldMapping(Argument, FieldInfo)

Add a field mapping. The source can be any valid Argument that can be part of the select; the target must be from the TargetTable tableinfo

Declaration
public void AddFieldMapping(Argument source, FieldInfo target)
Parameters
Type Name Description
Argument source

Any Argument that is a valid part of a ReturnFields collection

FieldInfo target

A previously non-mapped field in the TargetTable, which must previsouly have been set

GetTableInfos()

Return the TableInfo objects involved in the source of the statement (the SELECT part)

Declaration
public override TableInfo[] GetTableInfos()
Returns
Type Description
TableInfo[]
Overrides
SqlCommand.GetTableInfos()

MapCorrespondingFields(TableInfo)

Add field mappings for all fields in the source table that correspond to the target table (name and type match)

Declaration
public void MapCorrespondingFields(TableInfo sourceTable)
Parameters
Type Name Description
TableInfo sourceTable

Any TableInfo; will be scanned for fields with the same name and type as in the TargetTable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
QueryExectionExtensions.ExecuteNonQuery(SqlCommand)
QueryExectionExtensions.ExecuteNonQueryAsync(SqlCommand, CancellationToken)
QueryExectionExtensions.ExecuteReader(SqlCommand, bool)
QueryExectionExtensions.ExecuteReaderAsync(SqlCommand, bool, CancellationToken)
QueryExectionExtensions.ExecuteScalarAsync<T>(SqlCommand, bool, CancellationToken)
QueryExectionExtensions.ExecuteScalarAsync<T>(SqlCommand, CancellationToken)
QueryExectionExtensions.ExecuteScalar<T>(SqlCommand)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top