def __init__(self): "Initialize the connection object." self.__conn_ptr = NULL_PTR self.__conn_status = TM_ERROR self.__session_ptr = NULL_PTR self.__session_status = TM_ERROR self.__registered_notices = {} self.__curr_notice_ptr = NULL_PTR self.__host = com_line["-host"] self.__port = com_line["-port"] self.__server = com_line["-server"] self.__db = com_line["-database"] self.__usr = com_line["-user"] self.__pswd = com_line["-password"] self.__msg_flag = FALSE self.__first_row = FALSE self.__wait_to_drop = FALSE self.__interactive = FALSE self.__mi_conn = None if mode["type"] == "d": if self.__server == None: if WIN32 == TRUE: self.__server = registry_vals["DBMS"] else: self.__server = "NULL" if self.__db == None: if WIN32 == TRUE: self.__db = registry_vals["Database"] else: self.__db = raw_input("Enter the default database name: ") if self.__usr == None: if WIN32 == TRUE: self.__usr = registry_vals["Username"] else: self.__usr = raw_input("Enter the default user name: ") if self.__pswd == None: if WIN32 == TRUE: self.__pswd = registry_vals["Password"] else: self.__pswd = raw_input("Enter the default password: "******"NULL" if self.__port == None: self.__port = 4000 if mode["driver_on"] == FALSE: self.__mi_conn = mi.mi_connection()
import types import whrandom from time import * from threading import * import vl import mi # the random functions to get random integers and numbers between 0.0 and 1.0 rand = whrandom.random randint = whrandom.randint # shortcuts to execute TriggerMan and SQL commands, respectively tl = vl.exectl # Get an instance of the MI_CONNECTION class conn = mi.mi_connection() conn.open() class dataset1: "Contains fields which control the generation of the trees" num_predicates=0 num_fields=0 max_num_fields=19 #datafield initialization strings init_str = {} s_insert_str = {} #init_str[x][0] = predicate #init_str[x][1] = true_initializer