types.nim
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import db_sqlite type EDatastoreExists* = object of Exception EDatastoreDoesNotExist* = object of Exception EDatastoreUnavailable* = object of Exception EInvalidTag* = object of Exception EDirectoryNotFound* = object of Exception Datastore* = object db*: TDbConn path*: string name*: string QueryOptions* = object single*:bool limit*: int orderby*: string tags*: string search*: string TagExpression* = object tag*: string startswith*: bool endswith*: bool negated*: bool proc newQueryOptions*(): QueryOptions = return QueryOptions(single: false, limit: 0, orderby: "", tags: "", search: "") |