Back to index

python3.2  3.2.2
Classes | Functions
sqlite3.test.userfunctions Namespace Reference

Classes

class  AggrNoStep
class  AggrNoFinalize
class  AggrExceptionInInit
class  AggrExceptionInStep
class  AggrExceptionInFinalize
class  AggrCheckType
class  AggrSum
class  FunctionTests
class  AggregateTests
class  AuthorizerTests

Functions

def func_returntext
def func_returnunicode
def func_returnint
def func_returnfloat
def func_returnnull
def func_returnblob
def func_raiseexception
def func_isstring
def func_isint
def func_isfloat
def func_isnone
def func_isblob
def authorizer_cb
def suite
def test

Function Documentation

def sqlite3.test.userfunctions.authorizer_cb (   action,
  arg1,
  arg2,
  dbname,
  source 
)

Definition at line 360 of file userfunctions.py.

00360 
00361 def authorizer_cb(action, arg1, arg2, dbname, source):
00362     if action != sqlite.SQLITE_SELECT:
00363         return sqlite.SQLITE_DENY
00364     if arg2 == 'c2' or arg1 == 't2':
00365         return sqlite.SQLITE_DENY
00366     return sqlite.SQLITE_OK

Here is the caller graph for this function:

Definition at line 51 of file userfunctions.py.

00051 
00052 def func_isblob(v):
00053     return isinstance(v, (bytes, memoryview))

Definition at line 47 of file userfunctions.py.

00047 
00048 def func_isfloat(v):
    return type(v) is float

Definition at line 45 of file userfunctions.py.

00045 
00046 def func_isint(v):
    return type(v) is int

Definition at line 49 of file userfunctions.py.

00049 
00050 def func_isnone(v):
    return type(v) is type(None)

Definition at line 43 of file userfunctions.py.

00043 
00044 def func_isstring(v):
    return type(v) is str

Definition at line 40 of file userfunctions.py.

00040 
00041 def func_raiseexception():
00042     5/0

Definition at line 38 of file userfunctions.py.

00038 
00039 def func_returnblob():
    return b"blob"

Definition at line 34 of file userfunctions.py.

00034 
00035 def func_returnfloat():
    return 3.14

Definition at line 32 of file userfunctions.py.

00032 
00033 def func_returnint():
    return 42

Definition at line 36 of file userfunctions.py.

00036 
00037 def func_returnnull():
    return None

Definition at line 28 of file userfunctions.py.

00028 
00029 def func_returntext():
    return "foo"

Definition at line 30 of file userfunctions.py.

00030 
00031 def func_returnunicode():
    return "bar"

Definition at line 403 of file userfunctions.py.

00403 
00404 def suite():
00405     function_suite = unittest.makeSuite(FunctionTests, "Check")
00406     aggregate_suite = unittest.makeSuite(AggregateTests, "Check")
00407     authorizer_suite = unittest.makeSuite(AuthorizerTests, "Check")
00408     return unittest.TestSuite((function_suite, aggregate_suite, authorizer_suite))

Here is the caller graph for this function:

Definition at line 409 of file userfunctions.py.

00409 
00410 def test():
00411     runner = unittest.TextTestRunner()
00412     runner.run(suite())

Here is the call graph for this function: