81#define INITIAL_REORDER_SIZE 16
83#define INVALID_ROW_INDEX (-1)
163 while (col >
table->col_count)
165 col -=
table->col_count;
184 if (
column->unparsed.table)
194 for(
i = 1;
i <=
table->col_count;
i++)
198 r =
table->view->ops->get_column_info(
table->view,
i, &col_name, column_type,
246 TRACE(
"%p %d %d %p\n", wv,
row, col, stm );
259 return table->view->ops->fetch_stream(
table->view, rows[
table->table_index], col, stm );
269 TRACE(
"view %p, row %u, col %u, val %d.\n", wv,
row, col,
val );
309 TRACE(
"view %p, row %u, col %u, stream %p.\n", wv,
row, col,
stream);
344 for (
i = 0;
i <
table->col_count;
i++) {
347 if (!(mask_copy & (1 <<
i)))
356 mask_copy >>=
table->col_count;
379 for (
i = 1;
i <= col_count;
i++)
389 r =
table->view->ops->set_row(
table->view, rows[
table->table_index], reduced, reduced_mask);
487 ERR(
"Unknown operator %d\n",
expr->op );
503 return table->view->ops->fetch_int(
table->view, rows[
table->table_index],
527 ERR(
"Unknown operator %d\n",
expr->op );
559 ERR(
"Invalid expression type\n");
571 const WCHAR *l_str, *r_str;
582 if( l_str == r_str ||
583 ((!l_str || !*l_str) && (!r_str || !*r_str)) )
585 else if( l_str && ! r_str )
587 else if( r_str && ! l_str )
590 sr =
wcscmp( l_str, r_str );
615 *
val = tval - 0x8000;
622 *
val = tval - 0x80000000;
643 ERR(
"Invalid expression type\n");
656 for (table_rows[(*tables)->table_index] = 0;
657 table_rows[(*tables)->table_index] < (*tables)->row_count;
658 table_rows[(*tables)->table_index]++)
697 for (
i = 0;
i <
order->col_count;
i++)
701 r =
column->parsed.table->view->ops->fetch_int(
column->parsed.table->view,
703 column->parsed.column, &l_val);
710 r =
column->parsed.table->view->ops->fetch_int(
column->parsed.table->view,
712 column->parsed.column, &r_val);
720 return l_val < r_val ? -1 : 1;
748#define JOIN_TO_CONST_EXPR 0x10000
839 ERR(
"failed to get table dimensions\n");
844 if (
table->row_count == 0)
891 TRACE(
"%p %p %p\n", wv, rows, cols );
915 TRACE(
"%p %d %p %p %p %p\n", wv,
n,
name,
type, temporary, table_name );
925 type, temporary, table_name);
972 mask |= 1 << (
i - 1);
986 TRACE(
"%p %d %p\n", wv, eModifyMode, rec);
1000 return table->view->ops->modify(
table->view, eModifyMode, rec,
row);
1003 switch (eModifyMode)
1027 WARN(
"%p %d %p %u - unknown mode\n",
view, eModifyMode, rec,
row );
1143 switch( cond->
type )
1157 else if ((
type&0xff) == 4)
1181 switch( cond->
u.
expr.op )
1219 ERR(
"Invalid expression type\n");
1273 ERR(
"can't get table dimensions\n");
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define ERROR_NO_MORE_ITEMS
void msiobj_addref(MSIOBJECTHDR *info)
int msiobj_release(MSIOBJECTHDR *info)
static UINT WHERE_close(struct tagMSIVIEW *view)
static UINT add_row(MSIWHEREVIEW *wv, UINT vals[])
#define INITIAL_REORDER_SIZE
static UINT WHERE_set_string(struct tagMSIVIEW *view, UINT row, UINT col, const WCHAR *val, int len)
#define JOIN_TO_CONST_EXPR
static UINT expr_fetch_value(const union ext_column *expr, const UINT rows[], UINT *val)
static UINT WHERE_execute(struct tagMSIVIEW *view, MSIRECORD *record)
static UINT WHERE_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask)
static void free_reorder(MSIWHEREVIEW *wv)
static INT INT_evaluate_binary(MSIWHEREVIEW *wv, const UINT rows[], const struct complex_expr *expr, INT *val, MSIRECORD *record)
struct tagMSIROWENTRY MSIROWENTRY
static UINT WHERE_delete_row(struct tagMSIVIEW *view, UINT row)
static JOINTABLE * find_table(MSIWHEREVIEW *wv, UINT col, UINT *table_col)
struct tagMSIORDERINFO MSIORDERINFO
static UINT WHERE_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *cols)
static UINT STRING_evaluate(MSIWHEREVIEW *wv, const UINT rows[], const struct expr *expr, const MSIRECORD *record, const WCHAR **str)
static UINT INT_evaluate_unary(MSIWHEREVIEW *wv, const UINT rows[], const struct complex_expr *expr, INT *val, MSIRECORD *record)
struct tagMSIWHEREVIEW MSIWHEREVIEW
static UINT join_modify_update(struct tagMSIVIEW *view, MSIRECORD *rec)
static UINT WHERE_set_int(struct tagMSIVIEW *view, UINT row, UINT col, int val)
static UINT WHERE_get_column_info(struct tagMSIVIEW *view, UINT n, LPCWSTR *name, UINT *type, BOOL *temporary, LPCWSTR *table_name)
static int __cdecl compare_entry(const void *left, const void *right)
static UINT STRCMP_Evaluate(MSIWHEREVIEW *wv, const UINT rows[], const struct complex_expr *expr, INT *val, const MSIRECORD *record)
#define INVALID_ROW_INDEX
static UINT WHERE_VerifyCondition(MSIWHEREVIEW *wv, struct expr *cond, UINT *valid)
static UINT WHERE_fetch_int(struct tagMSIVIEW *view, UINT row, UINT col, UINT *val)
static BOOL in_array(JOINTABLE **array, JOINTABLE *elem)
static UINT WHERE_evaluate(MSIWHEREVIEW *wv, const UINT rows[], struct expr *cond, INT *val, MSIRECORD *record)
static UINT find_row(MSIWHEREVIEW *wv, UINT row, UINT *(values[]))
static UINT parse_column(MSIWHEREVIEW *wv, union ext_column *column, UINT *column_type)
static UINT WHERE_sort(struct tagMSIVIEW *view, column_info *columns)
static UINT init_reorder(MSIWHEREVIEW *wv)
static UINT WHERE_delete(struct tagMSIVIEW *view)
static UINT reorder_check(const struct expr *expr, JOINTABLE **ordered_tables, BOOL process_joins, JOINTABLE **lastused)
static const MSIVIEWOPS where_ops
static void add_to_array(JOINTABLE **array, JOINTABLE *elem)
UINT WHERE_CreateView(MSIDATABASE *db, MSIVIEW **view, LPWSTR tables, struct expr *cond)
static JOINTABLE ** ordertables(MSIWHEREVIEW *wv)
static UINT WHERE_modify(struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIRECORD *rec, UINT row)
static UINT join_find_row(MSIWHEREVIEW *wv, MSIRECORD *rec, UINT *row)
static UINT WHERE_fetch_stream(struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm)
static UINT WHERE_set_stream(MSIVIEW *view, UINT row, UINT col, IStream *stream)
static UINT check_condition(MSIWHEREVIEW *wv, MSIRECORD *record, JOINTABLE **tables, UINT table_rows[])
struct tagJOINTABLE JOINTABLE
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
struct nls_table * tables
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLboolean GLenum GLenum GLvoid * values
GLuint GLdouble GLdouble GLint GLint order
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define memcpy(s1, s2, n)
struct task_struct * current
static void * msi_realloc(void *mem, size_t len) __WINE_ALLOC_SIZE(2)
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
UINT msi_string2id(const string_table *st, const WCHAR *data, int len, UINT *id) DECLSPEC_HIDDEN
static void msi_free(void *mem)
BOOL MSI_RecordsAreFieldsEqual(MSIRECORD *a, MSIRECORD *b, UINT field) DECLSPEC_HIDDEN
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
const WCHAR * msi_string_lookup(const string_table *st, UINT id, int *len) DECLSPEC_HIDDEN
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
UINT MSI_RecordGetFieldCount(const MSIRECORD *rec) DECLSPEC_HIDDEN
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
UINT msi_view_get_row(MSIDATABASE *, MSIVIEW *, UINT, MSIRECORD **) DECLSPEC_HIDDEN
UINT MSI_RecordCopyField(MSIRECORD *, UINT, MSIRECORD *, UINT) DECLSPEC_HIDDEN
@ MSIMODIFY_INSERT_TEMPORARY
@ MSIMODIFY_VALIDATE_DELETE
@ MSIMODIFY_VALIDATE_FIELD
#define EXPR_COL_NUMBER32
UINT TABLE_CreateView(MSIDATABASE *db, LPCWSTR name, MSIVIEW **view) DECLSPEC_HIDDEN
#define EXPR_COL_NUMBER_STRING
static unsigned __int64 next
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
struct tagJOINTABLE * next
union ext_column columns[1]
struct tagMSIWHEREVIEW * wv
UINT(* delete_row)(struct tagMSIVIEW *view, UINT row)
MSIORDERINFO * order_info
#define new(TYPE, numElems)
#define FIELD_OFFSET(t, f)
struct ext_column::@504 unparsed
struct ext_column::@505 parsed
#define ERROR_BAD_QUERY_SYNTAX
#define ERROR_FUNCTION_FAILED