4 Copyright (C) 1996 Free Software Foundation, Inc.
6 Author: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
9 This file is part of the GNUstep Database Library.
11 This library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Library General Public
13 License as published by the Free Software Foundation; either
14 version 2 of the License, or (at your option) any later version.
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Library General Public License for more details.
21 You should have received a copy of the GNU Library General Public
22 License along with this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation,
24 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 // $Id: EOAndQualifier+SQL.m 1 2004-08-20 10:38:46Z znek $
29 #import "EOSQLQualifier.h"
32 @implementation EOAndQualifier(SQLQualifier)
34 /* SQL qualifier generation */
36 - (EOSQLQualifier *)sqlQualifierForEntity:(EOEntity *)_entity {
37 unsigned cc = [self->qualifiers count];
43 return [[self->qualifiers objectAtIndex:0] sqlQualifierForEntity:_entity];
49 left = [[self->qualifiers objectAtIndex:0] sqlQualifierForEntity:_entity];
50 right = [[self->qualifiers objectAtIndex:1] sqlQualifierForEntity:_entity];
51 [left conjoinWithQualifier:right];
55 EOSQLQualifier *masterQ;
58 for (i = 0, masterQ = nil; i < cc; i++) {
61 q = [[self->qualifiers objectAtIndex:i]
62 sqlQualifierForEntity:_entity];
66 [masterQ conjoinWithQualifier:q];
72 @end /* EOAndQualifier */