ORDAStatement Protocol Reference
| Conforms to | NSFastEnumeration ORDAResult |
| Declared in | ORDAStatement.h |
Overview
The ORDAStatement protocol is the protocol that all ORDA statements must conform to. It provides methods to bind values to parameters, access the SQL and results, etc. Instances conforming to this protocol can be expected to maintain a reference to the governor that created them. Thus, all statements must be released before the governor will be deallocated.
Tasks
Other Methods
-
– statementSQLThe statement’s SQL
required method -
– nextStatementThe next statement
required method -
– fastEnumerateAn enumerator for nextStatement
required method
Results
Binding
-
– bindBlob:toIndex:Binds data to a parameter
required method -
– bindDouble:toIndex:Binds a number as a double to a parameter
required method -
– bindInteger:toIndex:Binds a number as an integer to a parameter
required method -
– bindLong:toIndex:Binds a number as a long to a parameter
required method -
– bindNullToIndex:Binds null to a parameter
required method -
– bindText:withEncoding:toIndex:Binds a string to a parameter
required method -
– clearBindingsClears all bindings
required method
Instance Methods
bindBlob:toIndex:
Binds data to a parameter
- (id<ORDAResult>)bindBlob:(NSData *)data toIndex:(int)indexParameters
- data
the data
- index
the parameter index;
Return Value
nil on no error
Declared In
ORDAStatement.hbindDouble:toIndex:
Binds a number as a double to a parameter
- (id<ORDAResult>)bindDouble:(NSNumber *)number toIndex:(int)indexParameters
- number
the number
- index
the parameter index;
Return Value
nil on no error
Declared In
ORDAStatement.hbindInteger:toIndex:
Binds a number as an integer to a parameter
- (id<ORDAResult>)bindInteger:(NSNumber *)number toIndex:(int)indexParameters
- number
the number
- index
the parameter index;
Return Value
nil on no error
Declared In
ORDAStatement.hbindLong:toIndex:
Binds a number as a long to a parameter
- (id<ORDAResult>)bindLong:(NSNumber *)number toIndex:(int)indexParameters
- number
the number
- index
the parameter index;
Return Value
nil on no error
Declared In
ORDAStatement.hbindNullToIndex:
Binds null to a parameter
- (id<ORDAResult>)bindNullToIndex:(int)indexParameters
- index
the parameter index;
Return Value
nil on no error
Declared In
ORDAStatement.hbindText:withEncoding:toIndex:
Binds a string to a parameter
- (id<ORDAResult>)bindText:(NSString *)string withEncoding:(NSStringEncoding)encoding toIndex:(int)indexParameters
- string
the string
- encoding
the encoding to use
- index
the parameter index
Return Value
nil on no error
Declared In
ORDAStatement.hclearBindings
Clears all bindings
- (id<ORDAResult>)clearBindingsReturn Value
nil on no error
Discussion
This method resets any bound parameters.
Declared In
ORDAStatement.hfastEnumerate
An enumerator for nextStatement
- (id<NSFastEnumeration>)fastEnumerateReturn Value
an enumerator
Discussion
The enumerator returned by this method will enumerate through this statement and those it links to as a linked list. Thus this method can be used in conjunction with [ORDAGovernor createStatement:] to enumerate through a set of statements.
See Also
Declared In
ORDAStatement.hnextStatement
The next statement
- (id<ORDAStatement>)nextStatementReturn Value
the next statement If the SQL passed to [ORDAGovernor createStatement:] contained multiple statements separated by semicolons, this returns the statement after this one.
Declared In
ORDAStatement.hreset
Resets the statement
- (id<ORDAResult>)resetReturn Value
nil on no error
Discussion
This method clears the cached result object and performs any driver specific cleanup.
Declared In
ORDAStatement.hresult
The statement result
- (id<ORDAStatementResult>)resultReturn Value
the result of this statement’s execution
Discussion
The first time this method is called after a call to reset, the call will result in the execution of this statement. Every subsequent call until reset is called will return the same pointer.
Declared In
ORDAStatement.h