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.
Inherited from SQLStore: __init__, __getattr__, createTables, getAssociation, getAuthKey, removeAssociation, storeAssociation, storeNonce, txn_createTables, txn_getAssociation, txn_getAuthKey, txn_removeAssociation, txn_storeAssociation, txn_storeNonce, txn_useNonce, useNonce
Inherited from OpenIDStore: isDumb
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variable Summary
str add_nonce_sql = 'INSERT OR REPLACE INTO %(nonces)s VALUE...
str create_assoc_sql = '\n    CREATE TABLE %(associations)s\...
str create_auth_sql = 'INSERT INTO %(settings)s VALUES ("aut...
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_auth_sql = 'SELECT value FROM %(settings)s WHERE set...
str get_nonce_sql = 'SELECT * FROM %(nonces)s WHERE nonce = ...
str remove_assoc_sql = 'DELETE FROM %(associations)s WHERE s...
str remove_nonce_sql = 'DELETE FROM %(nonces)s WHERE nonce =...
str set_assoc_sql = 'INSERT OR REPLACE INTO %(associations)s...
Inherited from SQLStore: associations_table, nonces_table, settings_table
Inherited from OpenIDStore: AUTH_KEY_LEN

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)

Class Variable Details

add_nonce_sql

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

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_auth_sql

Type:
str
Value:
'INSERT INTO %(settings)s VALUES ("auth_key", ?);'                     

create_nonce_sql

Type:
str
Value:
'''
    CREATE TABLE %(nonces)s
    (
        nonce CHAR(8) UNIQUE PRIMARY KEY,
        expires INTEGER
    );
    '''                                                                

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_auth_sql

Type:
str
Value:
'SELECT value FROM %(settings)s WHERE setting = "auth_key";'           

get_nonce_sql

Type:
str
Value:
'SELECT * FROM %(nonces)s WHERE nonce = ?;'                            

remove_assoc_sql

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

remove_nonce_sql

Type:
str
Value:
'DELETE FROM %(nonces)s WHERE nonce = ?;'                              

set_assoc_sql

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

Generated by Epydoc 2.1 on Fri Dec 14 11:14:09 2007 http://epydoc.sf.net