Class WaitFor
When used in a Select, this will cause a WAITFOR DELAY <argument> to be executed in the database.
This is only intended for experimentation with statement cancellation etc., NOT for production code.
Support for Oracle may be sketchy.
Implements
Inherited Members
Namespace: SuperOffice.Data.Sql
Assembly: SoDataBase.dll
Syntax
public class WaitFor : Aggregation, ICloneable
Remarks
var ws = S.NewSelect(); // no tableinfo
ws.ReturnFields.Add(new WaitFor(S.Parameter(delay))); // explicit creation of WaitFor element, add as returnfield
var result = ws.ExecuteReader().ToList(); // returns 0 rows, after the specified delay
Constructors
WaitFor(Argument)
Create a WAITFOR statement (by using this method in a select)
Declaration
public WaitFor(Argument arg)
Parameters
Type | Name | Description |
---|---|---|
Argument | arg | How long to wait; mandatory |
Remarks
var ws = S.NewSelect(); // no tableinfo
ws.ReturnFields.Add(new WaitFor(S.Parameter(delay))); // explicit creation of WaitFor element, add as returnfield
var result = ws.ExecuteReader().ToList(); // returns 0 rows, after the specified delay
Exceptions
Type | Condition |
---|---|
SoIllegalOperationException | NULL or not TimeSpacen argument |
Methods
Clone()
Creates a copy of the query elements, but shares parameter values with the original, so it is not a complete copy.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
object | Copy of all the restrictions/joins |
Overrides
Remarks
This method is used by the SentryQueryUpdater to modify a query with sentry extensions without affecting the original query.