/* 
   MySQLSQLExpression.h

   Copyright (C) 2000 Free Software Foundation, Inc.

   Author: Stephen Peters <portnoy@portnoy.org>
	      based on the Postgres95 Adaptor written by 
	   Mircea Oancea <mircea@jupiter.elcom.pub.ro>
   Date: August 2000

   This file is part of the GNUstep Database Library.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this library; see the file COPYING.LIB.
   If not, write to the Free Software Foundation,
   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#ifndef __MySQLSQLExpression_h__
#define __MySQLSQLExpression_h__

#include <eoaccess/EOSQLExpression.h>

@class NSString;

@interface MySQLSQLExpression : EOSQLExpression
//Server does not accept where clause like 'field = null'
//we replace this by field is null
+(NSString*)convertWhereClause:(NSString*)whereClause;
+ (Class)selectExpressionClass;
+ (Class)deleteExpressionClass;
+ (Class)updateExpressionClass;
@end


@interface MySQLSelectSQLExpression : EOSelectSQLExpression
{
    BOOL lock;
}

- selectExpressionForAttributes:(NSArray*)attributes
  lock:(BOOL)flag
  qualifier:(EOQualifier*)qualifier
  fetchOrder:(NSArray*)fetchOrder
  channel:(EOAdaptorChannel*)channel;
//Server does not accept where clause like 'field = NULL'
//we replace this by field is null
- (NSString*)whereClauseForQualifier:(EOQualifier*)qualifier
					 joinExpression:(NSString*)joinExpression;

@end

@interface MySQLDeleteSQLExpression : EODeleteSQLExpression
//Serveur does not accept where clause like field = NULL
//we replace this by field is null
- (NSString*)whereClauseForQualifier:(EOQualifier*)qualifier
					 joinExpression:(NSString*)joinExpression;

@end

@interface MySQLUpdateSQLExpression : EOUpdateSQLExpression
//Serveur does not accept where clause like field = NULL
//we replace this by field is null
- (NSString*)whereClauseForQualifier:(EOQualifier*)qualifier
					 joinExpression:(NSString*)joinExpression;

@end

#endif /* __MySQLSQLExpression_h__ */
