wine/dlls/msi/query.h

136 lines
3.7 KiB
C
Raw Normal View History

/*
* Implementation of the Microsoft Installer (msi.dll)
*
* Copyright 2002 Mike McCormack for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_MSI_QUERY_H
#define __WINE_MSI_QUERY_H
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "objidl.h"
#include "msi.h"
#include "msiquery.h"
#include "msipriv.h"
#include "wine/list.h"
#define OP_EQ 1
#define OP_AND 2
#define OP_OR 3
#define OP_GT 4
#define OP_LT 5
#define OP_LE 6
#define OP_GE 7
#define OP_NE 8
#define OP_ISNULL 9
#define OP_NOTNULL 10
#define EXPR_COMPLEX 1
#define EXPR_COLUMN 2
#define EXPR_COL_NUMBER 3
#define EXPR_IVAL 4
#define EXPR_SVAL 5
#define EXPR_UVAL 6
2004-06-26 00:11:08 +00:00
#define EXPR_STRCMP 7
2004-06-30 18:18:27 +00:00
#define EXPR_WILDCARD 9
#define EXPR_COL_NUMBER_STRING 10
#define EXPR_COL_NUMBER32 11
2006-11-07 06:07:16 +00:00
#define EXPR_UNARY 12
2004-06-26 00:11:08 +00:00
struct sql_str {
LPCWSTR data;
INT len;
};
struct complex_expr
{
UINT op;
struct expr *left;
struct expr *right;
};
struct ext_column
{
LPCWSTR column;
LPCWSTR table;
};
struct expr
{
int type;
union
{
struct complex_expr expr;
INT ival;
UINT uval;
LPCWSTR sval;
struct ext_column column;
UINT col_number;
} u;
};
UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview,
struct list *mem );
2004-03-19 01:16:36 +00:00
UINT TABLE_CreateView( MSIDATABASE *db, LPCWSTR name, MSIVIEW **view );
2004-06-30 18:18:27 +00:00
UINT SELECT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
2007-06-12 20:51:36 +00:00
const column_info *columns );
UINT DISTINCT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table );
UINT ORDER_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
column_info *columns );
UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
struct expr *cond );
2009-05-28 13:02:50 +00:00
UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
column_info *col_info, BOOL hold );
2007-06-05 17:53:43 +00:00
UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
2005-05-30 11:32:18 +00:00
column_info *columns, column_info *values, BOOL temp );
UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
column_info *list, struct expr *expr );
2004-07-04 00:30:02 +00:00
2005-02-14 11:07:13 +00:00
UINT DELETE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table );
UINT JOIN_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR tables );
2006-07-26 07:27:15 +00:00
UINT ALTER_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR name, column_info *colinfo, int hold );
2006-08-18 05:09:03 +00:00
UINT STREAMS_CreateView( MSIDATABASE *db, MSIVIEW **view );
UINT STORAGES_CreateView( MSIDATABASE *db, MSIVIEW **view );
UINT DROP_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR name );
int sqliteGetToken(const WCHAR *z, int *tokenType);
2007-06-05 17:53:43 +00:00
MSIRECORD *msi_query_merge_record( UINT fields, const column_info *vl, MSIRECORD *rec );
2007-04-23 07:21:32 +00:00
UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
MSICONDITION persistent, MSITABLE **table_ret);
2007-04-23 07:21:32 +00:00
#endif /* __WINE_MSI_QUERY_H */