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, 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 = 'REPLACE INTO %(nonces)s VALUES (%%s, %%...
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 = 'REPLACE INTO %(associations)s VALUES (%...
Inherited from SQLStore: associations_table, nonces_table, settings_table
Inherited from OpenIDStore: AUTH_KEY_LEN

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:
'REPLACE INTO %(nonces)s VALUES (%%s, %%s);'                           

create_assoc_sql

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

create_auth_sql

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

create_nonce_sql

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

create_settings_sql

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

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_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 = %%s;'                          

remove_assoc_sql

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

remove_nonce_sql

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

set_assoc_sql

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

Generated by Epydoc 2.1 on Mon Jun 11 13:48:25 2007 http://epydoc.sf.net