Package openid :: Package store :: Module sqlstore :: Class SQLiteStore
[frames | no frames]

Type SQLiteStore

 object --+        
          |        
OpenIDStore --+    
              |    
       SQLStore --+
                  |
                 SQLiteStore


This is an SQLite-based specialization of SQLStore.

To create an instance, see SQLStore.__init__. To create the tables it will use, see SQLStore.createTables.

All other methods are implementation details.
Method Summary
  blobDecode(self, buf)
  blobEncode(self, s)
Convert a str object into the necessary object for storing in the database as a blob.
  useNonce(self, *args, **kwargs)
Return whether this nonce is present, and if it is, then remove it from the set.
Inherited from SQLStore: __init__, __getattr__, cleanupAssociations, cleanupNonces, createTables, getAssociation, removeAssociation, storeAssociation, txn_cleanupAssociations, txn_cleanupNonces, txn_createTables, txn_getAssociation, txn_removeAssociation, txn_storeAssociation, txn_useNonce
Inherited from OpenIDStore: cleanup
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variable Summary
str add_nonce_sql = 'INSERT INTO %(nonces)s VALUES (?, ?, ?)...
str clean_assoc_sql = 'DELETE FROM %(associations)s WHERE is...
str clean_nonce_sql = 'DELETE FROM %(nonces)s WHERE timestam...
str create_assoc_sql = '\n    CREATE TABLE %(associations)s\...
str create_nonce_sql = '\n    CREATE TABLE %(nonces)s (\n   ...
str create_settings_sql = '\n    CREATE TABLE %(settings)s\n...
str get_assoc_sql = 'SELECT handle, secret, issued, lifetime...
str get_assocs_sql = 'SELECT handle, secret, issued, lifetim...
str get_expired_sql = 'SELECT server_url FROM %(associations...
str remove_assoc_sql = 'DELETE FROM %(associations)s WHERE s...
str set_assoc_sql = 'INSERT OR REPLACE INTO %(associations)s...
Inherited from SQLStore: associations_table, nonces_table, settings_table

Method Details

blobEncode(self, s)

Convert a str object into the necessary object for storing in the database as a blob.
Overrides:
openid.store.sqlstore.SQLStore.blobEncode (inherited documentation)

useNonce(self, *args, **kwargs)

Return whether this nonce is present, and if it is, then remove it from the set.

str -> bool
Overrides:
openid.store.sqlstore.SQLStore.useNonce (inherited documentation)

Class Variable Details

add_nonce_sql

Type:
str
Value:
'INSERT INTO %(nonces)s VALUES (?, ?, ?);'                             

clean_assoc_sql

Type:
str
Value:
'DELETE FROM %(associations)s WHERE issued + lifetime < ?;'            

clean_nonce_sql

Type:
str
Value:
'DELETE FROM %(nonces)s WHERE timestamp < ?;'                          

create_assoc_sql

Type:
str
Value:
'''
    CREATE TABLE %(associations)s
    (
        server_url VARCHAR(2047),
        handle VARCHAR(255),
        secret BLOB(128),
        issued INTEGER,
        lifetime INTEGER,
...                                                                    

create_nonce_sql

Type:
str
Value:
'''
    CREATE TABLE %(nonces)s (
        server_url VARCHAR,
        timestamp INTEGER,
        salt CHAR(40),
        UNIQUE(server_url, timestamp, salt)
    );
    '''                                                                

create_settings_sql

Type:
str
Value:
'''
    CREATE TABLE %(settings)s
    (
        setting VARCHAR(128) UNIQUE PRIMARY KEY,
        value BLOB(20)
    );
    '''                                                                

get_assoc_sql

Type:
str
Value:
'SELECT handle, secret, issued, lifetime, assoc_type FROM %(associatio\
ns)s WHERE server_url = ? AND handle = ?;'                             

get_assocs_sql

Type:
str
Value:
'SELECT handle, secret, issued, lifetime, assoc_type FROM %(associatio\
ns)s WHERE server_url = ?;'                                            

get_expired_sql

Type:
str
Value:
'SELECT server_url FROM %(associations)s WHERE issued + lifetime < ?;'\
                                                                       

remove_assoc_sql

Type:
str
Value:
'DELETE FROM %(associations)s WHERE server_url = ? AND handle = ?;'    

set_assoc_sql

Type:
str
Value:
'INSERT OR REPLACE INTO %(associations)s VALUES (?, ?, ?, ?, ?, ?);'   

Generated by Epydoc 2.1 on Wed Nov 14 17:47:20 2007 http://epydoc.sf.net