msi: Implement MSIMODIFY_REFRESH using msi_view_refresh_row().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
31628cee6e
commit
0597646455
|
@ -153,4 +153,6 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
|
|||
|
||||
UINT msi_select_update( MSIVIEW *view, MSIRECORD *rec, UINT row ) DECLSPEC_HIDDEN;
|
||||
|
||||
UINT msi_view_refresh_row( MSIDATABASE *db, MSIVIEW *view, UINT row, MSIRECORD *rec ) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif /* __WINE_MSI_QUERY_H */
|
||||
|
|
|
@ -276,20 +276,25 @@ UINT msi_select_update(MSIVIEW *view, MSIRECORD *rec, UINT row)
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static UINT SELECT_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
|
||||
static UINT SELECT_modify( struct tagMSIVIEW *view, MSIMODIFY mode,
|
||||
MSIRECORD *rec, UINT row )
|
||||
{
|
||||
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
|
||||
|
||||
TRACE("%p %d %p %d\n", sv, eModifyMode, rec, row );
|
||||
TRACE("view %p, mode %d, rec %p, row %u.\n", view, mode, rec, row);
|
||||
|
||||
if( !sv->table )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
if (eModifyMode == MSIMODIFY_UPDATE)
|
||||
switch (mode)
|
||||
{
|
||||
case MSIMODIFY_REFRESH:
|
||||
return msi_view_refresh_row(sv->db, view, row, rec);
|
||||
case MSIMODIFY_UPDATE:
|
||||
return msi_select_update(view, rec, row);
|
||||
|
||||
return sv->table->ops->modify( sv->table, eModifyMode, rec, row );
|
||||
default:
|
||||
return sv->table->ops->modify( sv->table, mode, rec, row );
|
||||
}
|
||||
}
|
||||
|
||||
static UINT SELECT_delete( struct tagMSIVIEW *view )
|
||||
|
|
|
@ -3618,6 +3618,7 @@ static void test_join(void)
|
|||
|
||||
r = MsiViewFetch(hview, &hrec);
|
||||
ok( r == ERROR_SUCCESS, "failed to fetch view: %d\n", r );
|
||||
check_record(hrec, 2, "alveolar", "procerus");
|
||||
|
||||
r = MsiRecordSetStringA( hrec, 1, "epicranius" );
|
||||
ok( r == ERROR_SUCCESS, "failed to set string: %d\n", r );
|
||||
|
@ -3627,7 +3628,8 @@ static void test_join(void)
|
|||
|
||||
/* try another valid operation for joins */
|
||||
r = MsiViewModify(hview, MSIMODIFY_REFRESH, hrec);
|
||||
todo_wine ok( r == ERROR_SUCCESS, "failed to refresh row: %d\n", r );
|
||||
ok( r == ERROR_SUCCESS, "failed to refresh row: %d\n", r );
|
||||
check_record(hrec, 2, "epicranius", "procerus");
|
||||
|
||||
/* try an invalid operation for joins */
|
||||
r = MsiViewModify(hview, MSIMODIFY_DELETE, hrec);
|
||||
|
|
Loading…
Reference in New Issue