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

Type MySQLStore

 object --+        
          |        
OpenIDStore --+    
              |    
       SQLStore --+
                  |
                 MySQLStore


This is a MySQL-based specialization of SQLStore.

Uses InnoDB tables for transaction support.

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, blob)
Convert a blob as returned by the SQL engine into a str object.
Inherited from SQLStore: __init__, __getattr__, blobEncode, cleanupAssociations, cleanupNonces, createTables, getAssociation, removeAssociation, storeAssociation, txn_cleanupAssociations, txn_cleanupNonces, txn_createTables, txn_getAssociation, txn_removeAssociation, txn_storeAssociation, txn_useNonce, 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 (%%s, %%s...
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...
NoneType exceptions = None                                                                  
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 = 'REPLACE INTO %(associations)s VALUES (%...
Inherited from SQLStore: associations_table, nonces_table, settings_table

Method Details

blobDecode(self, blob)

Convert a blob as returned by the SQL engine into a str object.

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

Class Variable Details

add_nonce_sql

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

clean_assoc_sql

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

clean_nonce_sql

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

create_assoc_sql

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

create_nonce_sql

Type:
str
Value:
'''
    CREATE TABLE %(nonces)s (
        server_url BLOB,
        timestamp INTEGER,
        salt CHAR(40),
        PRIMARY KEY (server_url(255), timestamp, salt)
    )
    TYPE=InnoDB;
...                                                                    

create_settings_sql

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

exceptions

Type:
NoneType
Value:
None                                                                  

get_assoc_sql

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

get_assocs_sql

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

get_expired_sql

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

remove_assoc_sql

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

set_assoc_sql

Type:
str
Value:
'REPLACE INTO %(associations)s VALUES (%%s, %%s, %%s, %%s, %%s, %%s);'\
                                                                       

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