Click or drag to resize

SQLUpdater Class

Class to manage building a SQL update statement generically across all DBMS types.
Inheritance Hierarchy
SystemObject
  NetQuarrySQLUpdater

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public class SQLUpdater

The SQLUpdater type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyColumnCount
The number of columns being updated.
Public propertyPK
The primary key appropriate for providing to an IDatabase.Execute() call.
Public propertySchema
Retrieves the schema for the specified Table. Requires that the object was constructed with the SQLUpdater(IDatabase, String, String) constructor.
Public propertyTable
Gets/Sets the table that this class should using when building the UPDATE statement
Public propertyWhere
Gets/Sets the WHERE clause that this class should using when building the UPDATE statement
Top
Methods
  NameDescription
Public methodAddColumn(IField, SQLColumnFlags)
Adds a column to the class using data and configuration from the specified IField.
Public methodAddColumn(String, Object, OleDbType)
Adds a column to the class.
Public methodAddColumn(String, Object, OleDbType, Int32)
Adds a column to the class truncating if necessary.
Public methodAddColumn(String, Object, OleDbType, Int32, SQLColumnFlags)
Adds a column to the class truncating if necessary.
Public methodAddColumnPerSchema
Adds a column to the class if the column is found in the table's schema. The Schema is interrogated from the IDatabase object and for the Table provided in the object's SQLUpdater(IDatabase, String, String) constructor which must have been used in order to use this method.
Public methodAddExpression
Adds a literal expression to the UPDATE statement. The expression will be applied literally. For example, to increment the "quantity" column of a record, specify "quantity" for the name parameter and "quantity + 1" for the expr parameter. This will result in "quantity=quantity + 1" being included in the UPDATE statement.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecute(SQLHelperFlags, String)
Execute the SQL INSERT statement. Note that embedded functions are always resolved. Requires that the object was created with the SQLUpdater(IDatabase, String, String) constructor. Note that prior to v4.5.1 this method did NOT return a value.
Public methodExecute(IDatabase, SQLHelperFlags, String)
Execute the SQL UPDATE statement. Note that embedded functions are always resolved. Note that prior to v4.5.1 this method did NOT return a value.
Public methodExecute(IDatabase, SQLHelperFlags, String, Int32)
Execute the SQL UPDATE statement. Note that embedded functions are always resolved. Note that prior to v4.5.1 this method did NOT return a value.
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodToString(DBMSType)
Returns the UPDATE statement
Public methodToString(DBMSType, SQLHelperFlags)
Returns the UPDATE statement
Top
Extension Methods
  NameDescription
Public Extension MethodAddColumn
Add a column to the updater corresponding to the specified field and using the specified value. If the field does not exist in the mapper then no action is taken.
(Defined by MapperExtensions.)
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also