server/sqlutils.py
branchstable
changeset 3623 9b838e2d72bb
parent 2759 23d7a75693f8
child 3689 deb13e88e037
equal deleted inserted replaced
3622:f4317edf4058 3623:9b838e2d72bb
    31 
    31 
    32 lgc.USE_MX_DATETIME = False
    32 lgc.USE_MX_DATETIME = False
    33 SQL_PREFIX = 'cw_'
    33 SQL_PREFIX = 'cw_'
    34 
    34 
    35 
    35 
    36 def sqlexec(sqlstmts, cursor_or_execute, withpb=True, pbtitle='', delimiter=';'):
    36 def sqlexec(sqlstmts, cursor_or_execute, withpb=not os.environ.get('APYCOT_ROOT'),
       
    37             pbtitle='', delimiter=';'):
    37     """execute sql statements ignoring DROP/ CREATE GROUP or USER statements
    38     """execute sql statements ignoring DROP/ CREATE GROUP or USER statements
    38     error. If a cnx is given, commit at each statement
    39     error. If a cnx is given, commit at each statement
    39     """
    40     """
    40     if hasattr(cursor_or_execute, 'execute'):
    41     if hasattr(cursor_or_execute, 'execute'):
    41         execute = cursor_or_execute.execute
    42         execute = cursor_or_execute.execute