Partial implementation of the Microsoft Installer (msi.dll).
[wine/hacks.git] / dlls / msi / query.h
blob663a6737737e6e0d090e804bd07b2b5b75d473a6
1 /*
2 * Implementation of the Microsoft Installer (msi.dll)
4 * Copyright 2002 Mike McCormack for Codeweavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_MSI_QUERY_H
22 #define __WINE_MSI_QUERY_H
24 #include "winbase.h"
25 #include "objidl.h"
26 #include "msi.h"
27 #include "msiquery.h"
28 #include "msipriv.h"
31 #define OP_EQ 1
32 #define OP_AND 2
33 #define OP_OR 3
34 #define OP_GT 4
35 #define OP_LT 5
36 #define OP_LE 6
37 #define OP_GE 7
38 #define OP_NE 8
39 #define OP_ISNULL 9
40 #define OP_NOTNULL 10
42 #define EXPR_COMPLEX 1
43 #define EXPR_COLUMN 2
44 #define EXPR_COL_NUMBER 3
45 #define EXPR_IVAL 4
46 #define EXPR_SVAL 5
47 #define EXPR_UVAL 6
49 struct complex_expr
51 UINT op;
52 struct expr *left;
53 struct expr *right;
56 struct expr
58 int type;
59 union
61 struct complex_expr expr;
62 INT ival;
63 UINT uval;
64 LPWSTR sval;
65 LPWSTR column;
66 UINT col_number;
67 } u;
71 UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phView);
73 UINT TABLE_CreateView( MSIDATABASE *db, LPWSTR name, MSIVIEW **view );
75 UINT SELECT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table );
76 UINT SELECT_AddColumn( MSIVIEW *select, LPWSTR name );
78 UINT DISTINCT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table );
80 UINT ORDER_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table );
81 UINT ORDER_AddColumn( MSIVIEW *group, LPWSTR name );
83 UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table );
84 UINT WHERE_AddCondition( MSIVIEW *view, struct expr *condition );
86 int sqliteGetToken(const WCHAR *z, int *tokenType);
88 #endif /* __WINE_MSI_QUERY_H */