Class Insert
Class representing the SQL INSERT Statement
Inherited Members
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public sealed class Insert : PrivateSave, ISoDataLookup, ISentryIgnorable, ICloneable
Properties
FieldValuePairs
The returned fields from the SELECT statement.
Declaration
public ArgumentParameterCollection FieldValuePairs { get; set; }
Property Value
Type | Description |
---|---|
ArgumentParameterCollection |
InnerFieldValuePairs
Returns the current ArgumentParameterCollection. Throws a SoException if the collection is null or contains no elements.
Declaration
protected override ArgumentParameterCollection InnerFieldValuePairs { get; }
Property Value
Type | Description |
---|---|
ArgumentParameterCollection |
Overrides
InnerPrimaryKey
Overridden primary key for the sql-command.
Declaration
protected override FieldInfo InnerPrimaryKey { get; }
Property Value
Type | Description |
---|---|
FieldInfo |
Overrides
Remarks
There is no explicit primary key in an Insert-statement, however one of the arguments has to be the primary key field for the insert to be meaningful. This property therefore looks up the primary key field in the argument collection, and will return that field. You will get an exception if the argument collection does not currently contain the primary key field (as specified in the dictionary definition of the table).
InnerPrimaryKeyValue
Overridden primary key value for the sql-command.
Declaration
protected override Parameter InnerPrimaryKeyValue { get; }
Property Value
Type | Description |
---|---|
Parameter |
Overrides
Remarks
There is no explicit primary key in an Insert-statement, however one of the arguments has to be the primary key field for the insert to be meaningful. This property therefore looks up the primary key field in the argument collection, and will return that field. You will get an exception if the argument collection does not currently contain the primary key field (as specified in the dictionary definition of the table).
SqlType
Returns SqlType.IsInsert.
Declaration
public override SqlType SqlType { get; }
Property Value
Type | Description |
---|---|
SqlType |
Overrides
Methods
Clone()
Cloning function that returns a hybrid deep/shallow copy
Declaration
public object Clone()
Returns
Type | Description |
---|---|
object | Hybrid deep/shallow copy |
Remarks
This cloning function uses the Clone() function and is subject to the same assumptions and limitations. TableInfo/FieldInfo objects are not deep copied, and you do not get copies of the values of BLOB object parameters.
SetPrimaryKeyValue(Parameter)
Will set the value for the primary key. Will throw an exception if the value isn't an integer.
Declaration
public void SetPrimaryKeyValue(Parameter primaryValue)
Parameters
Type | Name | Description |
---|---|---|
Parameter | primaryValue | The value, represented as a Parameter. |
Remarks
Since this method is based on the InnerPrimaryKey method here, it requires the primary key field to be ALREADY DEFINED in the Insert query.
ToString()
String output.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | INSERT (....) INTO ... |