From 8a40b19273c9323869968837c965bc576474fb73 Mon Sep 17 00:00:00 2001 From: Ray Imber Date: Tue, 8 Oct 2019 02:24:06 -0700 Subject: [PATCH] Documentation improvements around the db interface (#12362) Added more details about the limits and reasoning behind the API. Came about from this discussion on IRC: https://irclogs.nim-lang.org/04-10-2019.html#16:58:04 --- src/db_sqlite.nim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/db_sqlite.nim b/src/db_sqlite.nim index 70538b7d67..f182ae65a0 100644 --- a/src/db_sqlite.nim +++ b/src/db_sqlite.nim @@ -94,6 +94,18 @@ ## ## db.close() ## +## +## Note +## ==== +## This module does not implement any ORM features such as mapping the types from the schema. +## Instead, a ``seq[string]`` is returned for each row. +## +## The reasoning is as follows: +## 1. it's close to what many DBs offer natively (char**) +## 2. it hides the number of types that the DB supports +## (int? int64? decimal up to 10 places? geo coords?) +## 3. it's convenient when all you do is to forward the data to somewhere else (echo, log, put the data into a new query) +## ## See also ## ======== ##