Package recsql :: Module sqlutil
[hide private]
[frames] | no frames]

Module sqlutil

source code


:mod:`sqlutils` -- Helper functions
===================================

Helper functions that are used throughout the :mod:`recsql` package.

How to use the sql converters and adapters:
   Declare types as 'NumpyArray'::

      cur.execute("CREATE TABLE test(a NumpyArray)")
      cur.execute("INSERT INTO test(a) values (?)", (my_array,))

   or as column types::

      cur.execute('SELECT a as "a [NumpyArray]" from test')

Module content
--------------
.. See the autogenerated content in the online docs or the source code.

Classes [hide private]
  FakeDtype
  FakeRecArray
Pseudo recarray that is used to feed SQLarray:
Functions [hide private]
 
adapt_numpyarray(a)
adapter: store numpy arrays in the db as ascii pickles
source code
 
convert_numpyarray(s)
converter: retrieve numpy arrays from the db as ascii pickles
source code
 
adapt_object(a)
adapter: store python objects in the db as ascii pickles
source code
 
convert_object(s)
convertor: retrieve python objects from the db as ascii pickles
source code