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
-
– statementSQL
The statement’s SQL
required method -
– nextStatement
The next statement
required method -
– fastEnumerate
An 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 -
– clearBindings
Clears all bindings
required method
Instance Methods
bindBlob:toIndex:
Binds data to a parameter
- (id<ORDAResult>)bindBlob:(NSData *)data toIndex:(int)index
Parameters
- data
the data
- index
the parameter index;
Return Value
nil on no error
Declared In
ORDAStatement.h
bindDouble:toIndex:
Binds a number as a double to a parameter
- (id<ORDAResult>)bindDouble:(NSNumber *)number toIndex:(int)index
Parameters
- number
the number
- index
the parameter index;
Return Value
nil on no error
Declared In
ORDAStatement.h
bindInteger:toIndex:
Binds a number as an integer to a parameter
- (id<ORDAResult>)bindInteger:(NSNumber *)number toIndex:(int)index
Parameters
- number
the number
- index
the parameter index;
Return Value
nil on no error
Declared In
ORDAStatement.h
bindLong:toIndex:
Binds a number as a long to a parameter
- (id<ORDAResult>)bindLong:(NSNumber *)number toIndex:(int)index
Parameters
- number
the number
- index
the parameter index;
Return Value
nil on no error
Declared In
ORDAStatement.h
bindNullToIndex:
Binds null to a parameter
- (id<ORDAResult>)bindNullToIndex:(int)index
Parameters
- index
the parameter index;
Return Value
nil on no error
Declared In
ORDAStatement.h
bindText:withEncoding:toIndex:
Binds a string to a parameter
- (id<ORDAResult>)bindText:(NSString *)string withEncoding:(NSStringEncoding)encoding toIndex:(int)index
Parameters
- string
the string
- encoding
the encoding to use
- index
the parameter index
Return Value
nil on no error
Declared In
ORDAStatement.h
clearBindings
Clears all bindings
- (id<ORDAResult>)clearBindings
Return Value
nil on no error
Discussion
This method resets any bound parameters.
Declared In
ORDAStatement.h
fastEnumerate
An enumerator for nextStatement
- (id<NSFastEnumeration>)fastEnumerate
Return 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.h
nextStatement
The next statement
- (id<ORDAStatement>)nextStatement
Return 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.h
reset
Resets the statement
- (id<ORDAResult>)reset
Return Value
nil on no error
Discussion
This method clears the cached result object and performs any driver specific cleanup.
Declared In
ORDAStatement.h
result
The statement result
- (id<ORDAStatementResult>)result
Return 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