objective-c-sql-query-builder
Public Member Functions | Protected Attributes
ZIMSqlCreateTriggerStatement Class Reference

#import <ZIMSqlCreateTriggerStatement.h>

Inheritance diagram for ZIMSqlCreateTriggerStatement:
<ZIMSqlStatement> <ZIMSqlDataDefinitionCommand>

List of all members.

Public Member Functions

(id) - initWithXmlSchema:error:
(id) - init
(void) - trigger:
(void) - trigger:temporary:
(void) - before
(void) - after
(void) - insteadOf
(void) - onDelete:
(void) - onInsert:
(void) - onUpdate:
(void) - onUpdate:column:
(void) - onUpdate:columns:
(void) - whenBlock:
(void) - whenBlock:connector:
(void) - when:operator:column:
(void) - when:operator:column:connector:
(void) - when:operator:value:
(void) - when:operator:value:connector:
(void) - sql:
(NSString *) - statement
(void) - parser:didStartElement:namespaceURI:qualifiedName:attributes: [implementation]
(void) - parser:didEndElement:namespaceURI:qualifiedName: [implementation]
(void) - parser:foundCDATA: [implementation]
(void) - parser:parseErrorOccurred: [implementation]

Protected Attributes

NSString_trigger
BOOL _temporary
NSString_advice
NSString_event
NSMutableArray * _when
NSMutableArray * _sql
NSMutableArray * _stack
NSString_cdata
NSUInteger _counter
NSError * _error

Detailed Description

Discussion:
This class represents an SQL create trigger statement.
Updated:
2012-03-18
See also:
http://www.sqlite.org/lang_createtrigger.html
http://sqlite.awardspace.info/syntax/sqlitepg11.htm

Member Function Documentation

- (void) after
Signature:
after:
Discussion:
This method causes the trigger to be fired after a specific command executes.
Updated:
2011-07-27
- (void) before
Signature:
before:
Discussion:
This method causes the trigger to be fired before a specific command executes.
Updated:
2011-07-27
- (instancetype) init
Signature:
init
Discussion:
This method initializes the class.
Returns:
An instance of this class.
Updated:
2012-03-20
- (instancetype) initWithXmlSchema: (NSData *)  xml
error: (NSError **)  error 
Signature:
initWithXmlSchema:error:
Discussion:
This method initializes the class via an XML file following Ziminji's "XML to DDL" schema.
Parameters:
xmlThe UTF-8 encoded string of XML.
errorUsed when an error occurs while processing the XML data. May be NULL.
Returns:
An instance of this class.
Updated:
2011-10-19
See also:
http://db.apache.org/ddlutils/
http://db.apache.org/ddlutils/schema/
- (void) insteadOf
Signature:
insteadOf:
Discussion:
This method causes the trigger to be fired instead of a specific command.
Updated:
2011-07-27
- (void) onDelete: (NSString *)  table
Signature:
onDelete:
Discussion:
This method will cause the trigger to listen for a "DELETE" command on the specified table.
Parameters:
tableThe table the trigger will listen on.
Updated:
2011-10-30
- (void) onInsert: (NSString *)  table
Signature:
onInsert:
Discussion:
This method will cause the trigger to listen for an "INSERT" command on the specified table.
Parameters:
tableThe table the trigger will listen on.
Updated:
2011-10-30
- (void) onUpdate: (NSString *)  table
Signature:
onUpdate:
Discussion:
This method will cause the trigger to listen for an "UPDATE" command on the specified table.
Parameters:
tableThe table the trigger will listen on.
Updated:
2011-10-30
- (void) onUpdate: (NSString *)  table
column: (NSString *)  column 
Signature:
onUpdate:column:
Discussion:
This method will cause the trigger to listen for an "UPDATE" command on the specified column in the table.
Parameters:
tableThe table the trigger will listen on.
columnThe triggering column.
Updated:
2011-10-30
- (void) onUpdate: (NSString *)  table
columns: (NSSet *)  columns 
Signature:
onUpdate:columns:
Discussion:
This method will cause the trigger to listen for an "UPDATE" command on on one or more the specified columns in the table.
Parameters:
tableThe table the trigger will listen on.
columnsThe triggering columns.
Updated:
2011-10-30
- (void) parser: (NSXMLParser *)  parser
didEndElement: (NSString *)  element
namespaceURI: (NSString *)  namespaceURI
qualifiedName: (NSString *)  qualifiedName 
[implementation]
- (void) parser: (NSXMLParser *)  parser
didStartElement: (NSString *)  element
namespaceURI: (NSString *)  namespaceURI
qualifiedName: (NSString *)  qualifiedName
attributes: (NSDictionary *)  attributes 
[implementation]
- (void) parser: (NSXMLParser *)  parser
foundCDATA: (NSData *)  CDATABlock 
[implementation]
- (void) parser: (NSXMLParser *)  parser
parseErrorOccurred: (NSError *)  error 
[implementation]
- (void) sql: (NSString *)  statement
Signature:
sql:
Discussion:
This method will set the SQL statement that will be used.
Parameters:
statementThe SQL statement to be executed.
Updated:
2011-07-27
- (NSString *) statement
Signature:
statement
Discussion:
This method will return the SQL statement.
Returns:
The SQL statement that was constructed.
Updated:
2011-10-19

Reimplemented from <ZIMSqlStatement>.

- (void) trigger: (NSString *)  trigger
Signature:
trigger:
Discussion:
This method sets the name for the trigger in the SQL statement.
Parameters:
triggerThe trigger's name.
Updated:
2011-07-29
- (void) trigger: (NSString *)  trigger
temporary: (BOOL)  temporary 
Signature:
trigger:temporary:
Discussion:
This method sets the name for the trigger in the SQL statement and whether it is temporary or not.
Parameters:
triggerThe trigger's name.
temporaryThis establishes whether the trigger will be temporary.
Updated:
2011-10-30
- (void) when: (id)  column1
operator: (NSString *)  operator
column: (id)  column2 
Signature:
when:operator:column:
Discussion:
This method will add a when clause to the SQL statement.
Parameters:
column1The column to be tested.
operatorThe operator to be used.
column2The column to be compared.
Updated:
2012-03-23
- (void) when: (id)  column1
operator: (NSString *)  operator
column: (id)  column2
connector: (NSString *)  connector 
Signature:
when:operator:column:connector:
Discussion:
This method will add a when clause to the SQL statement.
Parameters:
column1The column to be tested.
operatorThe operator to be used.
column2The column to be compared.
connectorThe connector to be used.
Updated:
2012-03-23
- (void) when: (id)  column
operator: (NSString *)  operator
value: (id)  value 
Signature:
when:operator:value:
Discussion:
This method will add a when clause to the SQL statement.
Parameters:
columnThe column to be tested.
operatorThe operator to be used.
valueThe value to be compared.
Updated:
2012-03-23
- (void) when: (id)  column
operator: (NSString *)  operator
value: (id)  value
connector: (NSString *)  connector 
Signature:
when:operator:value:connector:
Discussion:
This method will add a when clause to the SQL statement.
Parameters:
columnThe column to be tested.
operatorThe operator to be used.
valueThe value to be compared.
connectorThe connector to be used.
Updated:
2012-03-23
- (void) whenBlock: (NSString *)  brace
Signature:
whenBlock:
Discussion:
This method will start or end a block.
Parameters:
braceThe brace to be used; it is either an opening or closing brace.
Updated:
2011-07-27
- (void) whenBlock: (NSString *)  brace
connector: (NSString *)  connector 
Signature:
whenBlock:connector:
Discussion:
This method will start or end a block.
Parameters:
braceThe brace to be used; it is either an opening or closing brace.
connectorThe connector to be used.
Updated:
2011-07-27

Member Data Documentation

- (NSString*) _advice [protected]
- (NSString*) _cdata [protected]
- (NSUInteger) _counter [protected]
- (NSError*) _error [protected]
- (NSString*) _event [protected]
- (NSMutableArray*) _sql [protected]
- (NSMutableArray*) _stack [protected]
- (BOOL) _temporary [protected]
- (NSString*) _trigger [protected]
- (NSMutableArray*) _when [protected]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Properties Defines