From 88113637aecc8bf9fe3744bf9e34f5c4f31e8a9b Mon Sep 17 00:00:00 2001 From: niphlod Date: Tue, 30 Sep 2014 23:37:54 +0200 Subject: [PATCH] with dal new structure, API doc generation was left out of the picture. GROAN! --- docs/dal.adapters.rst | 150 +++++++++++++++++++++++++++++++++++ docs/dal.helpers.rst | 38 +++++++++ docs/dal.rst | 42 +++++++++- gluon/dal/adapters/google.py | 30 +++---- gluon/dal/adapters/imap.py | 51 ++++++------ 5 files changed, 270 insertions(+), 41 deletions(-) create mode 100644 docs/dal.adapters.rst create mode 100644 docs/dal.helpers.rst diff --git a/docs/dal.adapters.rst b/docs/dal.adapters.rst new file mode 100644 index 00000000..bef54380 --- /dev/null +++ b/docs/dal.adapters.rst @@ -0,0 +1,150 @@ +gluon.dal.adapters package +========================== + +Submodules +---------- + +gluon.dal.adapters.base module +------------------------------ + +.. automodule:: gluon.dal.adapters.base + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.couchdb module +--------------------------------- + +.. automodule:: gluon.dal.adapters.couchdb + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.cubrid module +-------------------------------- + +.. automodule:: gluon.dal.adapters.cubrid + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.db2 module +----------------------------- + +.. automodule:: gluon.dal.adapters.db2 + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.firebird module +---------------------------------- + +.. automodule:: gluon.dal.adapters.firebird + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.google module +-------------------------------- + +.. automodule:: gluon.dal.adapters.google + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.imap module +------------------------------ + +.. automodule:: gluon.dal.adapters.imap + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.informix module +---------------------------------- + +.. automodule:: gluon.dal.adapters.informix + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.ingres module +-------------------------------- + +.. automodule:: gluon.dal.adapters.ingres + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.mongo module +------------------------------- + +.. automodule:: gluon.dal.adapters.mongo + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.mssql module +------------------------------- + +.. automodule:: gluon.dal.adapters.mssql + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.mysql module +------------------------------- + +.. automodule:: gluon.dal.adapters.mysql + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.oracle module +-------------------------------- + +.. automodule:: gluon.dal.adapters.oracle + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.postgre module +--------------------------------- + +.. automodule:: gluon.dal.adapters.postgre + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.sapdb module +------------------------------- + +.. automodule:: gluon.dal.adapters.sapdb + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.sqlite module +-------------------------------- + +.. automodule:: gluon.dal.adapters.sqlite + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.adapters.teradata module +---------------------------------- + +.. automodule:: gluon.dal.adapters.teradata + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: gluon.dal.adapters + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/dal.helpers.rst b/docs/dal.helpers.rst new file mode 100644 index 00000000..bc146429 --- /dev/null +++ b/docs/dal.helpers.rst @@ -0,0 +1,38 @@ +gluon.dal.helpers package +========================= + +Submodules +---------- + +gluon.dal.helpers.classes module +-------------------------------- + +.. automodule:: gluon.dal.helpers.classes + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.helpers.methods module +-------------------------------- + +.. automodule:: gluon.dal.helpers.methods + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.helpers.regex module +------------------------------ + +.. automodule:: gluon.dal.helpers.regex + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: gluon.dal.helpers + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/dal.rst b/docs/dal.rst index 5208ed87..90c1564e 100644 --- a/docs/dal.rst +++ b/docs/dal.rst @@ -1,6 +1,44 @@ +gluon.dal package +================= -:mod:`dal` Module ------------------ +Subpackages +----------- + +.. toctree:: + + dal.adapters + dal.helpers + +Submodules +---------- + +gluon.dal.base module +--------------------- + +.. automodule:: gluon.dal.base + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.connection module +--------------------------- + +.. automodule:: gluon.dal.connection + :members: + :undoc-members: + :show-inheritance: + +gluon.dal.objects module +------------------------ + +.. automodule:: gluon.dal.objects + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- .. automodule:: gluon.dal :members: diff --git a/gluon/dal/adapters/google.py b/gluon/dal/adapters/google.py index ea64ed87..86c3ef3c 100644 --- a/gluon/dal/adapters/google.py +++ b/gluon/dal/adapters/google.py @@ -515,24 +515,26 @@ class GoogleDatastoreAdapter(NoSQLAdapter): """ This is the GAE version of select. Some notes to consider: - db['_lastsql'] is not set because there is not SQL statement string - for a GAE query + for a GAE query - 'nativeRef' is a magical fieldname used for self references on GAE - optional attribute 'projection' when set to True will trigger - use of the GAE projection queries. note that there are rules for - what is accepted imposed by GAE: each field must be indexed, - projection queries cannot contain blob or text fields, and you - cannot use == and also select that same field. see https://developers.google.com/appengine/docs/python/datastore/queries#Query_Projection + use of the GAE projection queries. note that there are rules for + what is accepted imposed by GAE: each field must be indexed, + projection queries cannot contain blob or text fields, and you + cannot use == and also select that same field. + see https://developers.google.com/appengine/docs/python/datastore/queries#Query_Projection - optional attribute 'filterfields' when set to True web2py will only - parse the explicitly listed fields into the Rows object, even though - all fields are returned in the query. This can be used to reduce - memory usage in cases where true projection queries are not - usable. + parse the explicitly listed fields into the Rows object, even though + all fields are returned in the query. This can be used to reduce + memory usage in cases where true projection queries are not + usable. - optional attribute 'reusecursor' allows use of cursor with queries - that have the limitby attribute. Set the attribute to True for the - first query, set it to the value of db['_lastcursor'] to continue - a previous query. The user must save the cursor value between - requests, and the filters must be identical. It is up to the user - to follow google's limitations: https://developers.google.com/appengine/docs/python/datastore/queries#Query_Cursors + that have the limitby attribute. Set the attribute to True for the + first query, set it to the value of db['_lastcursor'] to continue + a previous query. The user must save the cursor value between + requests, and the filters must be identical. It is up to the user + to follow google's limitations: + https://developers.google.com/appengine/docs/python/datastore/queries#Query_Cursors """ (items, tablename, fields) = self.select_raw(query,fields,attributes) diff --git a/gluon/dal/adapters/imap.py b/gluon/dal/adapters/imap.py index 922698c4..a63ac61b 100644 --- a/gluon/dal/adapters/imap.py +++ b/gluon/dal/adapters/imap.py @@ -12,7 +12,6 @@ from .base import NoSQLAdapter class IMAPAdapter(NoSQLAdapter): - drivers = ('imaplib',) """ IMAP server adapter @@ -44,29 +43,31 @@ class IMAPAdapter(NoSQLAdapter): Here is a list of supported fields: - Field Type Description - ################################################################ - uid string - answered boolean Flag - created date - content list:string A list of dict text or html parts - to string - cc string - bcc string - size integer the amount of octets of the message* - deleted boolean Flag - draft boolean Flag - flagged boolean Flag - sender string - recent boolean Flag - seen boolean Flag - subject string - mime string The mime header declaration - email string The complete RFC822 message** - attachments Each non text part as dict - encoding string The main detected encoding - - *At the application side it is measured as the length of the RFC822 + =========== ============== =========== + Field Type Description + =========== ============== =========== + uid string + answered boolean Flag + created date + content list:string A list of dict text or html parts + to string + cc string + bcc string + size integer the amount of octets of the message* + deleted boolean Flag + draft boolean Flag + flagged boolean Flag + sender string + recent boolean Flag + seen boolean Flag + subject string + mime string The mime header declaration + email string The complete RFC822 message (*) + attachments list Each non text part as dict + encoding string The main detected encoding + =========== ============== =========== + + (*) At the application side it is measured as the length of the RFC822 message string WARNING: As row id's are mapped to email sequence numbers, @@ -141,7 +142,7 @@ class IMAPAdapter(NoSQLAdapter): imapdb(q).select(imapdb.INBOX.sender, imapdb.INBOX.subject) """ - + drivers = ('imaplib',) types = { 'string': str, 'text': str,