home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep (Enterprise)
/
OpenStepENTCD.toast
/
OEMINSYS
/
ODBCAD.Z
/
ODBCSQLExpression.h
< prev
Wrap
Text File
|
1996-09-09
|
3KB
|
79 lines
/*
ODBCSQLExpression.h
Copyright (c) 1996, NeXT Software, Inc.
All rights reserved.
*/
#import <EOAccess/EOAccess.h>
@interface ODBCSQLExpression : EOSQLExpression
{
unsigned _inSelect:1;
unsigned _sybaseLocking:1;
}
- (NSString *)lockClause;
// Returns a the SQL string which will cause the RDBMS to place a
// pessimistic lock on any rows fetched.
- (NSString *)tableListWithRootEntity:(EOEntity *)entity;
// Returns a list of aliased table names that can be used as the "FROM"
// part of a SQL expression
- (void)prepareSelectExpressionWithAttributes:(NSArray *)attributes lock:(BOOL)lock fetchSpecification:(EOFetchSpecification *)fetchSpec;
// Invokes the following methods
// [self addSelectListAttribute:] for each att in attributes
// [qualifier sqlStringForSQLExpression:self]
// [self addOrderByAttributeOrdering:] for each attributeOrdering in fetchOrders
// [self joinExpression]
// [self tableListWithRootEntity:_entity]
// [self lockClause]
// [self assembleSelectStatementWithSelectString: ...]
- (void)addJoinClauseWithLeftName:(NSString *)leftName rightName:(NSString *)rightName joinSemantic:(EOJoinSemantic)semantic;
// Calls assembleJoinClauseWithLeftName ... and then appends the resulting
// string to the joinClause string
+ (BOOL)useBindVariables;
// Returns YES if the application is currently using bind variables, NO
// otherwise. ODBC is always returnning YES.
- (NSMutableDictionary *)bindVariableDictionaryForAttribute:(EOAttribute *)att value:value;
// Returns a dictionary to be stored in the EOSQLExpression that contains
// whatever adaptor specific information is necessary to bind the values.
// This following keys must have values in the binding dictionary because
// their values are used by the superclasss: EOBindVariableNameKey,
// EOBindVariableValueKey, EOBindVariablePlaceHolderKey, and
// EOBindVariableAttributeKey.
- (BOOL)shouldUseBindVariableForAttribute:(EOAttribute *)att;
// Returns YES if the the adaptor provides bind variable capability for
// attributes of this type. ODBC always return YES.
- (BOOL)mustUseBindVariableForAttribute:(EOAttribute *)att;
// Returns YES if the the adaptor must use bind variable capability for
// attributes of this type. ODBC always return YES.
@end
@interface ODBCSQLExpression(EOSchemaGeneration)
+ (NSArray *)primaryKeySupportStatementsForEntityGroup:(NSArray *)entityGroup;
+ (NSArray *)dropPrimaryKeySupportStatementsForEntityGroup:(NSArray *)entityGroup;
// returns empty arrays. It's a non supported feature for ODBC.
+ (NSArray *)primaryKeyConstraintStatementsForEntityGroup:(NSArray *)entityGroup;
// returns empty arrays. It's a non supported feature for ODBC.
// The primary key is encoded in the CREATE statement
- (NSString *)columnTypeStringForAttribute:(EOAttribute *)attribute;
// Assembles an adaptor specific type string suitable for use in a create
// table statement.
- (NSString *)allowsNullClauseForConstraint:(BOOL)allowsNull;
// Generates an adaptor specific string for use in a create table statement
// that indicates whether this column allows null.
@end