Package orm2 :: Package adapters :: Package gadfly :: Module datasource :: Class datasource
[hide private]
[frames] | no frames]

Class datasource

source code

        sql.datasource --+    
                         |    
datasource.datasource_base --+
                             |
                            datasource

An orm database adapter for gadfly.

Instance Methods [hide private]
  __init__(self, dbname="tmp", directory="/tmp", encoding="iso-8859-1")
The default values will create a database called tmp in your /tmp directory.
  _from_params(params)
  backend_encoding(self)
  insert(self, dbobj, dont_select=False)
The gadfly backend does not provide a mechanism to create unique keys for new rows.
  select_one(self, dbclass, *clauses)
Gadfly doesn't support the LIMIT clause.
  select_after_insert(self, dbobj)
The gadfly backend neither supports default values for columns not owns a mechanism to provide unique keys for new rows.
  select_after_insert_where(self, dbobj)
See select_after_insert() above.

Inherited from datasource.datasource_base: close, commit, count, cursor, delete_by_primary_key, execute, flush_updates, join_select, primary_key_where, query_one, rollback, run_select, select, select_by_primary_key, select_for_update, update, update_cursor

Inherited from datasource.datasource_base (private): _dbconn

Inherited from sql.datasource: escape_string, identifyer_quotes, string_quotes


Static Methods [hide private]
  from_params(params)

Class Variables [hide private]
  no_fetchone = True

Inherited from datasource.datasource_base: escaped_chars

Inherited from datasource.datasource_base (private): _format_funcs


Method Details [hide private]

__init__(self, dbname="tmp", directory="/tmp", encoding="iso-8859-1")
(Constructor)

source code 
The default values will create a database called tmp in your /tmp directory. Gadfly will create a number of files called dbname.* there.
Overrides: datasource.datasource_base.__init__

_from_params(params)

source code 
None

from_params(params)
Static Method

source code 
None

backend_encoding(self)

source code 
None
Overrides: sql.datasource.backend_encoding

insert(self, dbobj, dont_select=False)

source code 
The gadfly backend does not provide a mechanism to create unique keys for new rows. Values for the common_serial() datatype must be determined by the insert() function. It will query the maximum value of the id column and increment it.
Overrides: datasource.datasource_base.insert

select_one(self, dbclass, *clauses)

source code 
Gadfly doesn't support the LIMIT clause.
Overrides: datasource.datasource_base.select_one

select_after_insert(self, dbobj)

source code 
The gadfly backend neither supports default values for columns not owns a mechanism to provide unique keys for new rows. So the select_after_insert() mechanism is useless.
Overrides: datasource.datasource_base.select_after_insert

select_after_insert_where(self, dbobj)

source code 
See select_after_insert() above.
Overrides: datasource.datasource_base.select_after_insert_where

Class Variable Details [hide private]

no_fetchone

None
Value:
True