Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
399321c4
Commit
399321c4
authored
Aug 18, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add a stub ALTER query.
parent
3870bf0d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
212 additions
and
5 deletions
+212
-5
Makefile.in
dlls/msi/Makefile.in
+1
-0
alter.c
dlls/msi/alter.c
+176
-0
query.h
dlls/msi/query.h
+2
-0
sql.y
dlls/msi/sql.y
+30
-5
tokenize.c
dlls/msi/tokenize.c
+3
-0
No files found.
dlls/msi/Makefile.in
View file @
399321c4
...
...
@@ -9,6 +9,7 @@ EXTRALIBS = -luuid
C_SRCS
=
\
action.c
\
alter.c
\
appsearch.c
\
classes.c
\
create.c
\
...
...
dlls/msi/alter.c
0 → 100644
View file @
399321c4
/*
* Implementation of the Microsoft Installer (msi.dll)
*
* Copyright 2006 Mike McCormack
*
* 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
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wine/debug.h"
#include "msi.h"
#include "msiquery.h"
#include "objbase.h"
#include "objidl.h"
#include "msipriv.h"
#include "query.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msidb
);
typedef
struct
tagMSIALTERVIEW
{
MSIVIEW
view
;
MSIDATABASE
*
db
;
}
MSIALTERVIEW
;
static
UINT
ALTER_fetch_int
(
struct
tagMSIVIEW
*
view
,
UINT
row
,
UINT
col
,
UINT
*
val
)
{
MSIALTERVIEW
*
av
=
(
MSIALTERVIEW
*
)
view
;
TRACE
(
"%p %d %d %p
\n
"
,
av
,
row
,
col
,
val
);
return
ERROR_FUNCTION_FAILED
;
}
static
UINT
ALTER_fetch_stream
(
struct
tagMSIVIEW
*
view
,
UINT
row
,
UINT
col
,
IStream
**
stm
)
{
MSIALTERVIEW
*
av
=
(
MSIALTERVIEW
*
)
view
;
TRACE
(
"%p %d %d %p
\n
"
,
av
,
row
,
col
,
stm
);
return
ERROR_FUNCTION_FAILED
;
}
static
UINT
ALTER_set_int
(
struct
tagMSIVIEW
*
view
,
UINT
row
,
UINT
col
,
UINT
val
)
{
MSIALTERVIEW
*
av
=
(
MSIALTERVIEW
*
)
view
;
TRACE
(
"%p %d %d %04x
\n
"
,
av
,
row
,
col
,
val
);
return
ERROR_FUNCTION_FAILED
;
}
static
UINT
ALTER_insert_row
(
struct
tagMSIVIEW
*
view
,
MSIRECORD
*
record
)
{
MSIALTERVIEW
*
av
=
(
MSIALTERVIEW
*
)
view
;
TRACE
(
"%p %p
\n
"
,
av
,
record
);
return
ERROR_FUNCTION_FAILED
;
}
static
UINT
ALTER_execute
(
struct
tagMSIVIEW
*
view
,
MSIRECORD
*
record
)
{
MSIALTERVIEW
*
av
=
(
MSIALTERVIEW
*
)
view
;
FIXME
(
"%p %p
\n
"
,
av
,
record
);
return
ERROR_SUCCESS
;
}
static
UINT
ALTER_close
(
struct
tagMSIVIEW
*
view
)
{
MSIALTERVIEW
*
av
=
(
MSIALTERVIEW
*
)
view
;
TRACE
(
"%p
\n
"
,
av
);
return
ERROR_SUCCESS
;
}
static
UINT
ALTER_get_dimensions
(
struct
tagMSIVIEW
*
view
,
UINT
*
rows
,
UINT
*
cols
)
{
MSIALTERVIEW
*
av
=
(
MSIALTERVIEW
*
)
view
;
TRACE
(
"%p %p %p
\n
"
,
av
,
rows
,
cols
);
return
ERROR_FUNCTION_FAILED
;
}
static
UINT
ALTER_get_column_info
(
struct
tagMSIVIEW
*
view
,
UINT
n
,
LPWSTR
*
name
,
UINT
*
type
)
{
MSIALTERVIEW
*
av
=
(
MSIALTERVIEW
*
)
view
;
TRACE
(
"%p %d %p %p
\n
"
,
av
,
n
,
name
,
type
);
return
ERROR_FUNCTION_FAILED
;
}
static
UINT
ALTER_modify
(
struct
tagMSIVIEW
*
view
,
MSIMODIFY
eModifyMode
,
MSIRECORD
*
rec
)
{
MSIALTERVIEW
*
av
=
(
MSIALTERVIEW
*
)
view
;
TRACE
(
"%p %d %p
\n
"
,
av
,
eModifyMode
,
rec
);
return
ERROR_FUNCTION_FAILED
;
}
static
UINT
ALTER_delete
(
struct
tagMSIVIEW
*
view
)
{
MSIALTERVIEW
*
av
=
(
MSIALTERVIEW
*
)
view
;
TRACE
(
"%p
\n
"
,
av
);
return
ERROR_SUCCESS
;
}
static
UINT
ALTER_find_matching_rows
(
struct
tagMSIVIEW
*
view
,
UINT
col
,
UINT
val
,
UINT
*
row
,
MSIITERHANDLE
*
handle
)
{
TRACE
(
"%p, %d, %u, %p
\n
"
,
view
,
col
,
val
,
*
handle
);
return
ERROR_FUNCTION_FAILED
;
}
static
const
MSIVIEWOPS
alter_ops
=
{
ALTER_fetch_int
,
ALTER_fetch_stream
,
ALTER_set_int
,
ALTER_insert_row
,
ALTER_execute
,
ALTER_close
,
ALTER_get_dimensions
,
ALTER_get_column_info
,
ALTER_modify
,
ALTER_delete
,
ALTER_find_matching_rows
};
UINT
ALTER_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
LPCWSTR
name
,
int
hold
)
{
MSIALTERVIEW
*
av
=
NULL
;
TRACE
(
"%p
\n
"
,
av
);
av
=
msi_alloc_zero
(
sizeof
*
av
);
if
(
!
av
)
return
ERROR_FUNCTION_FAILED
;
/* fill the structure */
av
->
view
.
ops
=
&
alter_ops
;
av
->
db
=
db
;
*
view
=
&
av
->
view
;
return
ERROR_SUCCESS
;
}
dlls/msi/query.h
View file @
399321c4
...
...
@@ -121,6 +121,8 @@ UINT JOIN_CreateView( MSIDATABASE *db, MSIVIEW **view,
LPCWSTR
left
,
LPCWSTR
right
,
struct
expr
*
cond
);
UINT
ALTER_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
LPCWSTR
name
,
int
hold
);
int
sqliteGetToken
(
const
WCHAR
*
z
,
int
*
tokenType
);
#endif
/* __WINE_MSI_QUERY_H */
dlls/msi/sql.y
View file @
399321c4
...
...
@@ -79,15 +79,15 @@ static struct expr * EXPR_wildcard( void *info );
int integer;
}
%token TK_ABORT TK_AFTER TK_AGG_FUNCTION TK_ALL TK_AND TK_AS TK_ASC
%token TK_ABORT TK_AFTER TK_AGG_FUNCTION TK_ALL TK_A
LTER TK_A
ND TK_AS TK_ASC
%token TK_BEFORE TK_BEGIN TK_BETWEEN TK_BITAND TK_BITNOT TK_BITOR TK_BY
%token TK_CASCADE TK_CASE TK_CHAR TK_CHECK TK_CLUSTER TK_COLLATE TK_COLUMN
%token TK_COMMA TK_COMMENT TK_COMMIT TK_CONCAT TK_CONFLICT
%token TK_COMMA TK_COMMENT TK_COMMIT TK_CONCAT TK_CONFLICT
%token TK_CONSTRAINT TK_COPY TK_CREATE
%token TK_DEFAULT TK_DEFERRABLE TK_DEFERRED TK_DELETE TK_DELIMITERS TK_DESC
%token TK_DISTINCT TK_DOT TK_DROP TK_EACH
%token TK_ELSE TK_END TK_END_OF_FILE TK_EQ TK_EXCEPT TK_EXPLAIN
%token TK_FAIL TK_FLOAT TK_FOR TK_FOREIGN TK_FROM TK_FUNCTION
%token TK_FAIL TK_FLOAT TK_FOR TK_FOREIGN TK_FR
EE TK_FR
OM TK_FUNCTION
%token TK_GE TK_GLOB TK_GROUP TK_GT
%token TK_HAVING TK_HOLD
%token TK_IGNORE TK_ILLEGAL TK_IMMEDIATE TK_IN TK_INDEX TK_INITIALLY
...
...
@@ -127,10 +127,10 @@ static struct expr * EXPR_wildcard( void *info );
%type <column_list> selcollist column column_and_type column_def table_def
%type <column_list> column_assignment update_assign_list constlist
%type <query> query multifrom from fromtable selectfrom unorderedsel
%type <query> oneupdate onedelete oneselect onequery onecreate oneinsert
%type <query> oneupdate onedelete oneselect onequery onecreate oneinsert
onealter
%type <expr> expr val column_val const_val
%type <column_type> column_type data_type data_type_l data_count
%type <integer> number
%type <integer> number
alterop
/* Reference: http://mates.ms.mff.cuni.cz/oracle/doc/ora815nt/server.815/a67779/operator.htm */
%left TK_OR
...
...
@@ -156,6 +156,7 @@ onequery:
| oneinsert
| oneupdate
| onedelete
| onealter
;
oneinsert:
...
...
@@ -235,6 +236,30 @@ onedelete:
}
;
onealter:
TK_ALTER TK_TABLE table alterop
{
SQL_input* sql = (SQL_input*) info;
MSIVIEW *alter = NULL;
ALTER_CreateView( sql->db, &alter, $3, $4 );
if( !alter )
YYABORT;
$$ = alter;
}
;
alterop:
TK_HOLD
{
$$ = 1;
}
| TK_FREE
{
$$ = -1;
}
;
table_def:
column_def TK_PRIMARY TK_KEY selcollist
{
...
...
dlls/msi/tokenize.c
View file @
399321c4
...
...
@@ -41,6 +41,7 @@ struct Keyword {
static
const
WCHAR
ABORT_W
[]
=
{
'A'
,
'B'
,
'O'
,
'R'
,
'T'
,
0
};
static
const
WCHAR
AFTER_W
[]
=
{
'A'
,
'F'
,
'T'
,
'E'
,
'R'
,
0
};
static
const
WCHAR
ALTER_W
[]
=
{
'A'
,
'L'
,
'T'
,
'E'
,
'R'
,
0
};
static
const
WCHAR
ALL_W
[]
=
{
'A'
,
'L'
,
'L'
,
0
};
static
const
WCHAR
AND_W
[]
=
{
'A'
,
'N'
,
'D'
,
0
};
static
const
WCHAR
AS_W
[]
=
{
'A'
,
'S'
,
0
};
...
...
@@ -78,6 +79,7 @@ static const WCHAR EXPLAIN_W[] = { 'E','X','P','L','A','I','N',0 };
static
const
WCHAR
FAIL_W
[]
=
{
'F'
,
'A'
,
'I'
,
'L'
,
0
};
static
const
WCHAR
FOR_W
[]
=
{
'F'
,
'O'
,
'R'
,
0
};
static
const
WCHAR
FOREIGN_W
[]
=
{
'F'
,
'O'
,
'R'
,
'E'
,
'I'
,
'G'
,
'N'
,
0
};
static
const
WCHAR
FREE_W
[]
=
{
'F'
,
'R'
,
'E'
,
'E'
,
0
};
static
const
WCHAR
FROM_W
[]
=
{
'F'
,
'R'
,
'O'
,
'M'
,
0
};
static
const
WCHAR
FULL_W
[]
=
{
'F'
,
'U'
,
'L'
,
'L'
,
0
};
static
const
WCHAR
GLOB_W
[]
=
{
'G'
,
'L'
,
'O'
,
'B'
,
0
};
...
...
@@ -152,6 +154,7 @@ static const WCHAR WHERE_W[] = { 'W','H','E','R','E',0 };
static
const
Keyword
aKeywordTable
[]
=
{
{
ABORT_W
,
TK_ABORT
},
{
AFTER_W
,
TK_AFTER
},
{
ALTER_W
,
TK_ALTER
},
{
ALL_W
,
TK_ALL
},
{
AND_W
,
TK_AND
},
{
AS_W
,
TK_AS
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment