sql_lib
index

 
Modules
       
datetime
socket

 
Classes
       
__builtin__.object
dataset
val_info

 
class dataset(__builtin__.object)
     Methods defined here:
__init__(self)
at(self, r, c)
the fuction get the cell's value at dataset.
 
paramater r, the row's index.
paramater c, the column's index.
 
return value, return the cell at(r,c)'s value.
col_name(self, c)
the fuction get the column's at dataset.
paramater c, the column's index.
 
return value, return the column's name of the dataset.
cols_of(self)
the fuction get the columns at dataset.
 
return value, return the column's count of the dataset.
cout(self)
the fuction output all dataset to console.
rows_of(self)
the fuction get the rows at dataset.
 
return value, return the row's count of the dataset.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class val_info(__builtin__.object)
    the val_info provide the information about a cell's value.
such as the value's type, size, sign or the length(named sz) when it is string.
 
  Methods defined here:
__init__(self, type, sign, size)
the fuction construct a val_info.
 
paramater type, must be dt_int/dt_float/dt_str/dt_date/dt_time/dt_datetime/dt_un. 
        dt_un is default as unknow type.
paramater sign, must be ds_sign/ds_usgn/ds_un. 
        ds_un is default as unknow type.
paramater size, db_un is default as unknow type.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
calcsize(...)
Return size of C struct described by format string fmt.
connect_to_server(ip, port, name, passwd)
the fuction connect to db's server.
paramater ip, the server's ip.
paramater port, the server's port.
paramater name, the user's name.
paramater passwd, the user's password.
 
return value, login successful return 1, login failed return 0.
exec_sql(sql)
the fuction execute sql string to db's server.
paramater sql, the string will be executed to server.
 
return value, return the dataset executed.
exit_to_server()
the fuction exit to db's server.
pack(...)
Return string containing values v1, v2, ... packed according to fmt.
pack_into(...)
Pack the values v1, v2, ... according to fmt.
Write the packed bytes into the writable buffer buf starting at offset.
parse_val(rd, vi, vis, i)
parse_vi(rd, vi, vis, i)
unpack(...)
Unpack the string containing packed C structure data, according to fmt.
Requires len(string) == calcsize(fmt).
unpack_from(...)
Unpack the buffer, containing packed C structure data, according to
fmt, starting at offset. Requires len(buffer[offset:]) >= calcsize(fmt).

 
Data
        db_s1 = 0
db_s2 = 1
db_s4 = 2
db_s8 = 3
db_un = 11
ds_sign = 0
ds_un = 2
ds_usgn = 1
dt_date = 3
dt_datetime = 5
dt_float = 1
dt_int = 0
dt_str = 2
dt_time = 4
dt_un = 6
exec_f = 1
exec_s = 0
exit_f = 4294967295L
sk = <socket._socketobject object>