home *** CD-ROM | disk | FTP | other *** search
- // InformixSQLExpression.h
- // Copyright (c) 1994, NeXT Software, Inc. All rights reserved.
- //
-
- #import <EOAccess/EOAccess.h>
- #import <stdio.h>
-
- typedef enum {
- InfCHAR = 0,
- InfSMINT = 1,
- InfINT = 2,
- InfFLOAT = 3,
- InfSMFLOAT = 4,
- InfDECIMAL = 5,
- InfSERIAL = 6,
- InfDATE = 7,
- InfMONEY = 8,
- InfNULL = 9,
- InfDTIME = 10,
- InfBYTES = 11,
- InfTEXT = 12,
- InfVCHAR = 13,
- InfINTERVAL = 14,
- InfNCHAR = 15,
- InfNVCHAR = 16
- } InformixServerType;
-
-
- @interface InformixSQLExpression:EOSQLExpression
- //
- // Methods that are mandatory overrides from the EOSQLExpression
- // parent class.
- //
-
- + (int)serverTypeIdForName:(NSString *)typeName;
- // For the given type ("DECIMAL", "DATE", "CHAR", etc.) return the
- // Informix server code (InfDecimal, InfDate, InfCHAR, etc.).
-
- + (BOOL)isValidQualifierType:(NSString *)typeName model:(EOModel *)model;
- // Methods called by the EO framework (through the adaptor) to generate
- // correct SQL.
-
- + (NSString *)formatValue:(id)value forAttribute:(EOAttribute *)attribute;
- // returns a formatted string representation of value that is suitable
- // for use in a sql statement
-
- - (NSString *)lockClause;
- // Return @"FOR UPDATE OF"
-
- - (NSString *)assembleSelectStatementWithAttributes:(NSArray *)attributes lock:(BOOL)lock qualifier:(EOQualifier *)qualifier fetchOrder:(NSArray *)fetchOrder selectString:(NSString *)selectString columnList:(NSString *)columnList tableList:(NSString *)tableList whereClause:(NSString *)whereClause joinClause:(NSString *)joinClause orderByClause:(NSString *)orderByClause lockClause:(NSString *)lockClause;
-
- - (NSString *)assembleJoinClauseWithLeftName:(NSString *)leftName rightName:(NSString *)rightName joinSemantic:(EOJoinSemantic)semantic;
-
- - (void)addOrderByAttributeOrdering:(EOSortOrdering *)sortOrdering;
-
- // Overrides to use variable binding.
- - (NSMutableDictionary *)bindVariableDictionaryForAttribute:(EOAttribute *)attribute value:value;
- - (BOOL)shouldUseBindVariableForAttribute:(EOAttribute *)att;
- - (BOOL)mustUseBindVariableForAttribute:(EOAttribute *)att;
-
- //
- // End of overrides
- //
-
- - (NSString *)tableListWithRootEntity:(EOEntity *)entity;
- @end
-