Class Update
Class representing the SQL update Statement
Inherited Members
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public sealed class Update : PrivateSave, ISoDataLookup, ISentryIgnorable, ICloneable
Properties
AdditionalRestriction
Update statements require a Primary Key, set through SetPrimaryKey(FieldInfo) and SetPrimaryKeyValue(Parameter). It is also possible to set an additional restriction, using this property; there will always be an AND between anything set here and the PK restriction.
Declaration
public Restriction AdditionalRestriction { get; set; }
Property Value
Type | Description |
---|---|
Restriction |
FieldValuePairs
The returned fields from the SELECT statement.
Declaration
public ArgumentParameterCollection FieldValuePairs { get; set; }
Property Value
Type | Description |
---|---|
ArgumentParameterCollection |
InnerFieldValuePairs
Returns ArgumentParameterCollection that is a container for the fields and values that belong to the current sql-command.
Declaration
protected override ArgumentParameterCollection InnerFieldValuePairs { get; }
Property Value
Type | Description |
---|---|
ArgumentParameterCollection |
Overrides
InnerPrimaryKey
Gets the primary key needed to decide which specific row to alter with the current sql-command.
Declaration
protected override FieldInfo InnerPrimaryKey { get; }
Property Value
Type | Description |
---|---|
FieldInfo |
Overrides
InnerPrimaryKeyValue
The actual value the primary key must have.
Declaration
protected override Parameter InnerPrimaryKeyValue { get; }
Property Value
Type | Description |
---|---|
Parameter | The inner primary key value. |
Overrides
SqlType
Returns SqlType.IsUpdate.
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 | A new object that is a copy of this instance. |
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.
SetPrimaryKey(FieldInfo)
Will set the primary key for the update-command. Will throw an exception if the value isn't FieldInfo and primary key.
Declaration
public void SetPrimaryKey(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | The FieldInfo primary key |
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. |
ToString()
String output.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | UPDATE ... (...) WHERE ... |