aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.Native/Msi/ModifyView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.Native/Msi/ModifyView.cs')
-rw-r--r--src/WixToolset.Core.Native/Msi/ModifyView.cs75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/WixToolset.Core.Native/Msi/ModifyView.cs b/src/WixToolset.Core.Native/Msi/ModifyView.cs
new file mode 100644
index 00000000..989de174
--- /dev/null
+++ b/src/WixToolset.Core.Native/Msi/ModifyView.cs
@@ -0,0 +1,75 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Core.Native.Msi
4{
5 /// <summary>
6 /// Enumeration of different modify modes.
7 /// </summary>
8 public enum ModifyView
9 {
10 /// <summary>
11 /// Writes current data in the cursor to a table row. Updates record if the primary
12 /// keys match an existing row and inserts if they do not match. Fails with a read-only
13 /// database. This mode cannot be used with a view containing joins.
14 /// </summary>
15 Assign = 3, // Writes current data in the cursor to a table row. Updates record if the primary keys match an existing row and inserts if they do not match. Fails with a read-only database. This mode cannot be used with a view containing joins.
16
17 /// <summary>
18 /// Remove a row from the table. You must first call the Fetch function with the same
19 /// record. Fails if the row has been deleted. Works only with read-write records. This
20 /// mode cannot be used with a view containing joins.
21 /// </summary>
22 Delete = 6, // Remove a row from the table. You must first call the MsiViewFetch function with the same record. Fails if the row has been deleted. Works only with read-write records. This mode cannot be used with a view containing joins.
23
24 /// <summary>
25 /// Inserts a record. Fails if a row with the same primary keys exists. Fails with a read-only
26 /// database. This mode cannot be used with a view containing joins.
27 /// </summary>
28 Insert = 1, // Inserts a record. Fails if a row with the same primary keys exists. Fails with a read-only database. This mode cannot be used with a view containing joins.
29
30 /// <summary>
31 /// Inserts a temporary record. The information is not persistent. Fails if a row with the
32 /// same primary key exists. Works only with read-write records. This mode cannot be
33 /// used with a view containing joins.
34 /// </summary>
35 InsertTemporary = 7, // Inserts a temporary record. The information is not persistent. Fails if a row with the same primary key exists. Works only with read-write records. This mode cannot be used with a view containing joins.
36
37 /// <summary>
38 /// Inserts or validates a record in a table. Inserts if primary keys do not match any row
39 /// and validates if there is a match. Fails if the record does not match the data in
40 /// the table. Fails if there is a record with a duplicate key that is not identical.
41 /// Works only with read-write records. This mode cannot be used with a view containing joins.
42 /// </summary>
43 Merge = 5, // Inserts or validates a record in a table. Inserts if primary keys do not match any row and validates if there is a match. Fails if the record does not match the data in the table. Fails if there is a record with a duplicate key that is not identical. Works only with read-write records. This mode cannot be used with a view containing joins.
44
45 /// <summary>
46 /// Refreshes the information in the record. Must first call Fetch with the
47 /// same record. Fails for a deleted row. Works with read-write and read-only records.
48 /// </summary>
49 Refresh = 0, // Refreshes the information in the record. Must first call MsiViewFetch with the same record. Fails for a deleted row. Works with read-write and read-only records.
50
51 /// <summary>
52 /// Updates or deletes and inserts a record into a table. Must first call Fetch with
53 /// the same record. Updates record if the primary keys are unchanged. Deletes old row and
54 /// inserts new if primary keys have changed. Fails with a read-only database. This mode cannot
55 /// be used with a view containing joins.
56 /// </summary>
57 Replace = 4, // Updates or deletes and inserts a record into a table. Must first call MsiViewFetch with the same record. Updates record if the primary keys are unchanged. Deletes old row and inserts new if primary keys have changed. Fails with a read-only database. This mode cannot be used with a view containing joins.
58
59 /// <summary>
60 /// Refreshes the information in the supplied record without changing the position in the
61 /// result set and without affecting subsequent fetch operations. The record may then
62 /// be used for subsequent Update, Delete, and Refresh. All primary key columns of the
63 /// table must be in the query and the record must have at least as many fields as the
64 /// query. Seek cannot be used with multi-table queries. This mode cannot be used with
65 /// a view containing joins. See also the remarks.
66 /// </summary>
67 Seek = -1, // Refreshes the information in the supplied record without changing the position in the result set and without affecting subsequent fetch operations. The record may then be used for subsequent Update, Delete, and Refresh. All primary key columns of the table must be in the query and the record must have at least as many fields as the query. Seek cannot be used with multi-table queries. This mode cannot be used with a view containing joins. See also the remarks.
68
69 /// <summary>
70 /// Updates an existing record. Non-primary keys only. Must first call Fetch. Fails with a
71 /// deleted record. Works only with read-write records.
72 /// </summary>
73 Update = 2, // Updates an existing record. Nonprimary keys only. Must first call MsiViewFetch. Fails with a deleted record. Works only with read-write records.
74 }
75}