2006-02-17 00:04:10 +00:00
|
|
|
/*
|
|
|
|
* 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
|
2006-08-01 23:12:11 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-02-17 00:04:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_MSI_QUERY_H
|
|
|
|
#define __WINE_MSI_QUERY_H
|
|
|
|
|
2018-03-04 23:30:58 +00:00
|
|
|
#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"
|
|
|
|
|
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
#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
|
|
|
|
#define EXPR_STRCMP 7
|
|
|
|
#define EXPR_WILDCARD 9
|
|
|
|
#define EXPR_COL_NUMBER_STRING 10
|
2006-08-01 23:12:11 +00:00
|
|
|
#define EXPR_COL_NUMBER32 11
|
2006-11-28 11:21:39 +00:00
|
|
|
#define EXPR_UNARY 12
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
struct sql_str {
|
|
|
|
LPCWSTR data;
|
|
|
|
INT len;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct complex_expr
|
|
|
|
{
|
|
|
|
UINT op;
|
|
|
|
struct expr *left;
|
|
|
|
struct expr *right;
|
|
|
|
};
|
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
struct tagJOINTABLE;
|
|
|
|
union ext_column
|
2009-11-16 01:13:42 +00:00
|
|
|
{
|
2012-01-21 17:19:12 +00:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
LPCWSTR column;
|
|
|
|
LPCWSTR table;
|
|
|
|
} unparsed;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
UINT column;
|
|
|
|
struct tagJOINTABLE *table;
|
|
|
|
} parsed;
|
2009-11-16 01:13:42 +00:00
|
|
|
};
|
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
struct expr
|
|
|
|
{
|
|
|
|
int type;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct complex_expr expr;
|
|
|
|
INT ival;
|
|
|
|
UINT uval;
|
|
|
|
LPCWSTR sval;
|
2012-01-21 17:19:12 +00:00
|
|
|
union ext_column column;
|
2006-02-17 00:04:10 +00:00
|
|
|
} u;
|
|
|
|
};
|
|
|
|
|
2013-09-22 16:30:18 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
MSIDATABASE *db;
|
|
|
|
LPCWSTR command;
|
|
|
|
DWORD n, len;
|
|
|
|
UINT r;
|
|
|
|
MSIVIEW **view; /* View structure for the resulting query. This value
|
|
|
|
* tracks the view currently being created so we can free
|
|
|
|
* this view on syntax error.
|
|
|
|
*/
|
|
|
|
struct list *mem;
|
|
|
|
} SQL_input;
|
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview,
|
2012-01-21 17:19:12 +00:00
|
|
|
struct list *mem ) DECLSPEC_HIDDEN;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
UINT TABLE_CreateView( MSIDATABASE *db, LPCWSTR name, MSIVIEW **view ) DECLSPEC_HIDDEN;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
UINT SELECT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
|
2012-01-21 17:19:12 +00:00
|
|
|
const column_info *columns ) DECLSPEC_HIDDEN;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
UINT DISTINCT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table ) DECLSPEC_HIDDEN;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
UINT ORDER_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
|
2012-01-21 17:19:12 +00:00
|
|
|
column_info *columns ) DECLSPEC_HIDDEN;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR tables,
|
|
|
|
struct expr *cond ) DECLSPEC_HIDDEN;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2009-06-06 15:59:47 +00:00
|
|
|
UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
|
2012-01-21 17:19:12 +00:00
|
|
|
column_info *col_info, BOOL hold ) DECLSPEC_HIDDEN;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
|
2012-01-21 17:19:12 +00:00
|
|
|
column_info *columns, column_info *values, BOOL temp ) DECLSPEC_HIDDEN;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
|
|
|
|
column_info *list, struct expr *expr ) DECLSPEC_HIDDEN;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
UINT DELETE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table ) DECLSPEC_HIDDEN;
|
2006-08-01 23:12:11 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
UINT ALTER_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR name, column_info *colinfo, int hold ) DECLSPEC_HIDDEN;
|
2008-01-16 10:11:22 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
UINT STREAMS_CreateView( MSIDATABASE *db, MSIVIEW **view ) DECLSPEC_HIDDEN;
|
2006-08-30 19:24:26 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
UINT STORAGES_CreateView( MSIDATABASE *db, MSIVIEW **view ) DECLSPEC_HIDDEN;
|
2008-09-21 15:24:30 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
UINT DROP_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR name ) DECLSPEC_HIDDEN;
|
2008-12-27 15:10:14 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
int sqliteGetToken(const WCHAR *z, int *tokenType, int *skip) DECLSPEC_HIDDEN;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2012-01-21 17:19:12 +00:00
|
|
|
MSIRECORD *msi_query_merge_record( UINT fields, const column_info *vl, MSIRECORD *rec ) DECLSPEC_HIDDEN;
|
2008-01-16 10:11:22 +00:00
|
|
|
|
|
|
|
UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
|
2022-03-13 18:08:41 +00:00
|
|
|
MSICONDITION persistent, BOOL hold ) DECLSPEC_HIDDEN;
|
2006-11-28 11:21:39 +00:00
|
|
|
|
2022-03-12 23:16:38 +00:00
|
|
|
UINT msi_select_update( MSIVIEW *view, MSIRECORD *rec, UINT row ) DECLSPEC_HIDDEN;
|
|
|
|
|
2022-03-12 23:16:39 +00:00
|
|
|
UINT msi_view_refresh_row( MSIDATABASE *db, MSIVIEW *view, UINT row, MSIRECORD *rec ) DECLSPEC_HIDDEN;
|
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
#endif /* __WINE_MSI_QUERY_H */
|