Clone this wiki locally
Documentation of the various features provided by the library
The ORM is able to take a .NET class definition and convert it to a SQL table definition. (Most ORMs go in the other direction.) It does this by examining all public properties of your classes and is assisted by attributes that you can use to specify column details.
The following attributes are used:
PrimaryKeyThis property is the primary key of the table. Only single-column primary keys are supported.
AutoIncrementThis property is automatically generated by the database upon insert. The propertytype should be an integer and should also be marked with the
IndexedThis property should have an index created for it.
MaxLengthIf this property is a
MaxLengthis used to specify the
varcharmax size. The default max length is 140.
IgnoreThis property will not be in the table.
The following data types are supported in properties:
Integersare stored using the
Booleanare stored as
integerswith the value
truewhile all other values are
Enumsare stored as
integersusing the enum's value.
DoublesFloats are stored as
Stringsare stored using
varcharswith a maximum size specified by the
MaxLengthattribute. If the attribute isn't specified, the max length defaults to 140.
DateTimesare stored as
datetimecolumns and are subject to the precision offered by SQLite.
byteare stored as
Guidstructures are stored as