praeclarum/sqlite-net — pull request #223 by ColonelDuddits (2013-07-20 02:30:35+00:00)
Title: Added NotNullAttribute Fix #187

Added NotNullAttribute.
Added support for extended error codes.

Usage:

public Class TestObj
{
[PrimaryKey, autoincrement]
public int? PatientId { get; set; }
[NotNull]
public string FirstName { get; set; }
[NotNull]
public string LastName { get; set; }
}

A database column created from a property decorated with this attribute will be created with a not null constraint. Violations of not null constraints from Insert, Update, and ExecuteNonQuery methods results in a NotNullConstraintViolationException being thrown. NotNullConstraintViolationException contains an IEnumerable property listing all the columns that violated the constraint.