summary refs log tree commit diff stats
path: root/lib/pure/db_common.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-12-17 14:37:49 +0100
committerAndreas Rumpf <rumpf_a@web.de>2015-12-17 14:39:40 +0100
commit4e157114a62aa3a55bf3358a7823134b42d75add (patch)
treee8e7c94cdaa53894e0f467047d4936d5bbe543a9 /lib/pure/db_common.nim
parent7d98ae7e61503a0cc9a7380d184657cb06374e48 (diff)
downloadNim-4e157114a62aa3a55bf3358a7823134b42d75add.tar.gz
added more column information fields
Diffstat (limited to 'lib/pure/db_common.nim')
-rw-r--r--lib/pure/db_common.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/pure/db_common.nim b/lib/pure/db_common.nim
index 522d13db2..9187a67ce 100644
--- a/lib/pure/db_common.nim
+++ b/lib/pure/db_common.nim
@@ -36,7 +36,8 @@ type
     dbFloat,          ## some floating point type
     dbDate,           ## a year-month-day description
     dbTime,           ## HH:MM:SS information
-    dbDatetime,       ## year-month-day and HH:MM:SS information
+    dbDatetime,       ## year-month-day and HH:MM:SS information,
+                      ## plus optional time or timezone information
     dbTimestamp,      ## Timestamp values are stored as the number of seconds
                       ## since the epoch ('1970-01-01 00:00:00' UTC).
     dbTimeInterval,   ## an interval [a,b] of times
@@ -48,6 +49,7 @@ type
     dbUuid,           ## a UUID
     dbInet,           ## an IP address
     dbMacAddress,     ## a MAC address
+    dbGeometry,       ## some geometric type
     dbPoint,          ## Point on a plane   (x,y)
     dbLine,           ## Infinite line ((x1,y1),(x2,y2))
     dbLseg,           ## Finite line segment   ((x1,y1),(x2,y2))
@@ -66,6 +68,7 @@ type
     notNull*: bool    ## does the type contain NULL?
     name*: string     ## the name of the type
     size*: Natural    ## the size of the datatype; 0 if of variable size
+    maxReprLen*: Natural ## maximal length required for the representation
     precision*, scale*: Natural ## precision and scale of the number
     min*, max*: BiggestInt ## the minimum and maximum of allowed values
     validValues*: seq[string] ## valid values of an enum or a set
@@ -74,6 +77,8 @@ type
     name*: string      ## name of the column
     tableName*: string ## name of the table the column belongs to (optional)
     typ*: DbType       ## type of the column
+    primaryKey*: bool  ## is this a primary key?
+    foreignKey*: bool  ## is this a foreign key?
   DbColumns* = seq[DbColumn]
 
 {.deprecated: [EDb: DbError, TSqlQuery: SqlQuery, FDb: DbEffect,