Microsoft.Deployment.WindowsInstaller.Linq
Apply to a subclass of QRecord to indicate the name of
the table the record type is to be used with.
If this attribute is not used on a record type, the default
table name will be derived from the record type name. (An
optional underscore suffix is stripped.)
Creates a new DatabaseTableAttribute for the specified table.
name of the table associated with the record type
Gets or sets the table associated with the record type.
Apply to a property on a subclass of QRecord to indicate
the name of the column the property is to be associated with.
If this attribute is not used on a property, the default
column name will be the same as the property name.
Creates a new DatabaseColumnAttribute which maps a
record property to a column.
name of the column associated with the property
Gets or sets the column associated with the record property.
Allows any Database instance to be converted into a queryable database.
Converts any Database instance into a queryable database.
Queryable database instance that operates on the same
MSI handle.
This extension method is meant for convenient on-the-fly conversion.
If the existing database instance already happens to be a QDatabase,
then it is returned unchanged. Otherwise since the new database
carries the same MSI handle, only one of the instances needs to be
closed, not both.
Queryable MSI database - extends the base Database class with
LINQ query functionality along with predefined entity types
for common tables.
Opens an existing database in read-only mode.
Path to the database file.
the database could not be created/opened
Because this constructor initiates database access, it cannot be used with a
running installation.
The Database object should be d after use.
The finalizer will close the handle if it is still open, however due to the nondeterministic
nature of finalization it is best that the handle be closed manually as soon as it is no
longer needed, as leaving lots of unused handles open can degrade performance.
Opens an existing database with another database as output.
Path to the database to be read.
Open mode for the database
Database object representing the created or opened database
the database could not be created/opened
When a database is opened as the output of another database, the summary information stream
of the output database is actually a read-only mirror of the original database and thus cannot
be changed. Additionally, it is not persisted with the database. To create or modify the
summary information for the output database it must be closed and re-opened.
The returned Database object should be d after use.
The finalizer will close the handle if it is still open, however due to the nondeterministic
nature of finalization it is best that the handle be closed manually as soon as it is no
longer needed, as leaving lots of unused handles open can degrade performance.
Opens an existing database or creates a new one.
Path to the database file. If an empty string
is supplied, a temporary database is created that is not persisted.
Open mode for the database
the database could not be created/opened
To make and save changes to a database first open the database in transaction,
create or, or direct mode. After making the changes, always call the Commit method
before closing the database handle. The Commit method flushes all buffers.
Always call the Commit method on a database that has been opened in direct
mode before closing the database. Failure to do this may corrupt the database.
Because this constructor initiates database access, it cannot be used with a
running installation.
The Database object should be d after use.
The finalizer will close the handle if it is still open, however due to the nondeterministic
nature of finalization it is best that the handle be closed manually as soon as it is no
longer needed, as leaving lots of unused handles open can degrade performance.
Creates a new database from an MSI handle.
Native MSI database handle.
True if the handle should be closed
when the database object is disposed
Path of the database file, if known
Mode the handle was originally opened in
Gets or sets a log where all MSI SQL queries are written.
The log can be useful for debugging, or simply to watch the LINQ magic in action.
Gets a queryable table from the datbaase.
name of the table
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Queryable standard table with predefined specialized record type.
Generic record entity for queryable databases,
and base for strongly-typed entity subclasses.
Several predefined specialized subclasses are provided for common
standard tables. Subclasses for additional standard tables
or custom tables are not necessary, but they are easy to create
and make the coding experience much nicer.
When creating subclasses, the following attributes may be
useful: ,
Do not call. Use QTable.NewRecord() instead.
Subclasses must also provide a public parameterless constructor.
QRecord constructors are only public due to implementation
reasons (to satisfy the new() constraint on the QTable generic
class). They are not intended to be called by user code other than
a subclass constructor. If the constructor is invoked directly,
the record instance will not be properly initialized (associated
with a database table) and calls to methods on the instance
will throw a NullReferenceException.
Gets the number of fields in the record.
Gets or sets a record field.
column name of the field
Setting a field value will automatically update the database.
Gets or sets a record field.
zero-based column index of the field
Setting a field value will automatically update the database.
Used by subclasses to get a field as an integer.
zero-based column index of the field
Used by subclasses to get a field as a nullable integer.
zero-based column index of the field
Dumps all record fields to a string.
Update multiple fields in the record (and the database).
column names of fields to update
new values for each field being updated
Update multiple fields in the record (and the database).
column indexes of fields to update
new values for each field being updated
The record (primary keys) must already exist in the table.
Updating primary key fields is not yet implemented; use Delete()
and Insert() instead.
Inserts the record in the database.
The record (primary keys) may not already exist in the table.
Use to get a new
record. Prmary keys and all required fields
must be filled in before insertion.
Inserts the record into the table.
true if the record is temporarily
inserted, to be visible only as long as the database is open
The record (primary keys) may not already exist in the table.
Use to get a new
record. Prmary keys and all required fields
must be filled in before insertion.
Deletes the record from the table if it exists.
Not yet implemented.
Not yet implemented.
Not yet implemented.
Not yet implemented.
Not yet implemented.
Not yet implemented.
Not yet implemented.
Represents one table in a LINQ-queryable Database.
type that represents one record in the table
This class is the primary gateway to all LINQ to MSI query functionality.
The TRecord generic parameter may be the general
class, or a specialized subclass of QRecord.
Infers the name of the table this instance will be
associated with.
table name
The table name is retrieved from a DatabaseTableAttribute
on the record type if it exists; otherwise the name is
derived from the name of the record type itself.
(An optional underscore suffix on the record type name is dropped.)
Creates a new QTable, inferring the table name
from the name of the record type parameter.
database that contains the table
Creates a new QTable with an explicit table name.
database that contains the table
name of the table
Gets schema information about the table.
Gets the database this table is associated with.
Enumerates over all records in the table.
Creates a new record that can be inserted into this table.
a record with all fields initialized to null
Primary keys and required fields must be filled in with
non-null values before the record can be inserted.
The record is tied to this table in this database;
it cannot be inserted into another table or database.
Implements the LINQ to MSI query functionality.
the result type of the current query --
either some kind of QRecord, or some projection of record data
Distribution specific strings.
News URL for the distribution.
Short product name for the distribution.
Support URL for the distribution.
Telemetry URL format for the distribution.
VS Extensions Landing page Url for the distribution.