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");
void msiobj_addref(MSIOBJECTHDR *info)
UINT(* delete_row)(struct tagMSIVIEW *view, UINT row)
const WCHAR * msi_string_lookup(const string_table *st, UINT id, int *len) DECLSPEC_HIDDEN
#define ERROR_INVALID_PARAMETER
static INT INT_evaluate_binary(MSIWHEREVIEW *wv, const UINT rows[], const struct complex_expr *expr, INT *val, MSIRECORD *record)
#define JOIN_TO_CONST_EXPR
static UINT WHERE_set_string(struct tagMSIVIEW *view, UINT row, UINT col, const WCHAR *val, int len)
GLuint GLdouble GLdouble GLint GLint order
static void add_to_array(JOINTABLE **array, JOINTABLE *elem)
static UINT WHERE_fetch_stream(struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm)
static int __cdecl compare_entry(const void *left, const void *right)
static UINT add_row(MSIWHEREVIEW *wv, UINT vals[])
UINT MSI_RecordCopyField(MSIRECORD *, UINT, MSIRECORD *, UINT) DECLSPEC_HIDDEN
static const MSIVIEWOPS where_ops
#define new(TYPE, numElems)
UINT TABLE_CreateView(MSIDATABASE *db, LPCWSTR name, MSIVIEW **view) DECLSPEC_HIDDEN
static UINT parse_column(MSIWHEREVIEW *wv, union ext_column *column, UINT *column_type)
#define ERROR_NO_MORE_ITEMS
static UINT expr_fetch_value(const union ext_column *expr, const UINT rows[], UINT *val)
static UINT WHERE_close(struct tagMSIVIEW *view)
#define INVALID_ROW_INDEX
GLdouble GLdouble GLdouble r
GLuint GLuint GLsizei count
struct tagMSIORDERINFO MSIORDERINFO
static UINT STRING_evaluate(MSIWHEREVIEW *wv, const UINT rows[], const struct expr *expr, const MSIRECORD *record, const WCHAR **str)
GLboolean GLenum GLenum GLvoid * values
struct ext_column::@493 unparsed
static UINT WHERE_evaluate(MSIWHEREVIEW *wv, const UINT rows[], struct expr *cond, INT *val, MSIRECORD *record)
static UINT WHERE_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *cols)
struct nls_table * tables
static JOINTABLE * find_table(MSIWHEREVIEW *wv, UINT col, UINT *table_col)
GLenum GLsizei GLenum GLenum const GLvoid * table
static void msi_free(void *mem)
#define EXPR_COL_NUMBER_STRING
static UINT WHERE_set_stream(MSIVIEW *view, UINT row, UINT col, IStream *stream)
static UINT WHERE_VerifyCondition(MSIWHEREVIEW *wv, struct expr *cond, UINT *valid)
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)
static void free_reorder(MSIWHEREVIEW *wv)
BOOL MSI_RecordsAreFieldsEqual(MSIRECORD *a, MSIRECORD *b, UINT field) DECLSPEC_HIDDEN
static UINT INT_evaluate_unary(MSIWHEREVIEW *wv, const UINT rows[], const struct complex_expr *expr, INT *val, MSIRECORD *record)
static JOINTABLE ** ordertables(MSIWHEREVIEW *wv)
#define ERROR_FUNCTION_FAILED
static UINT WHERE_fetch_int(struct tagMSIVIEW *view, UINT row, UINT col, UINT *val)
union ext_column columns[1]
static UINT find_row(MSIWHEREVIEW *wv, UINT row, UINT *(values[]))
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 *))
#define EXPR_COL_NUMBER32
static UINT WHERE_delete_row(struct tagMSIVIEW *view, UINT row)
WINE_DEFAULT_DEBUG_CHANNEL(msidb)
struct tagJOINTABLE * next
static UINT WHERE_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask)
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
static UINT check_condition(MSIWHEREVIEW *wv, MSIRECORD *record, JOINTABLE **tables, UINT table_rows[])
static UINT join_modify_update(struct tagMSIVIEW *view, MSIRECORD *rec)
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
static UINT WHERE_set_int(struct tagMSIVIEW *view, UINT row, UINT col, int val)
static UINT WHERE_delete(struct tagMSIVIEW *view)
struct ext_column::@494 parsed
static UINT WHERE_get_column_info(struct tagMSIVIEW *view, UINT n, LPCWSTR *name, UINT *type, BOOL *temporary, LPCWSTR *table_name)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
UINT msi_string2id(const string_table *st, const WCHAR *data, int len, UINT *id) DECLSPEC_HIDDEN
static UINT STRCMP_Evaluate(MSIWHEREVIEW *wv, const UINT rows[], const struct complex_expr *expr, INT *val, const MSIRECORD *record)
struct task_struct * current
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
int msiobj_release(MSIOBJECTHDR *info)
struct tagMSIROWENTRY MSIROWENTRY
struct tagJOINTABLE JOINTABLE
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
#define memcpy(s1, s2, n)
static UINT WHERE_modify(struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIRECORD *rec, UINT row)
static UINT WHERE_execute(struct tagMSIVIEW *view, MSIRECORD *record)
MSIORDERINFO * order_info
#define INITIAL_REORDER_SIZE
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static unsigned __int64 next
static UINT join_find_row(MSIWHEREVIEW *wv, MSIRECORD *rec, UINT *row)
static UINT init_reorder(MSIWHEREVIEW *wv)
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
UINT WHERE_CreateView(MSIDATABASE *db, MSIVIEW **view, LPWSTR tables, struct expr *cond)
#define FIELD_OFFSET(t, f)
struct tagMSIWHEREVIEW MSIWHEREVIEW
UINT msi_view_get_row(MSIDATABASE *, MSIVIEW *, UINT, MSIRECORD **) DECLSPEC_HIDDEN
static UINT reorder_check(const struct expr *expr, JOINTABLE **ordered_tables, BOOL process_joins, JOINTABLE **lastused)
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
#define ERROR_CALL_NOT_IMPLEMENTED
GLuint GLuint GLsizei GLenum type
struct tagMSIWHEREVIEW * wv
static BOOL in_array(JOINTABLE **array, JOINTABLE *elem)
#define ERROR_BAD_QUERY_SYNTAX
static UINT WHERE_sort(struct tagMSIVIEW *view, column_info *columns)
UINT MSI_RecordGetFieldCount(const MSIRECORD *rec) DECLSPEC_HIDDEN
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