Changeset 4442:c8eae13dcf88 in livinglogic.python.xist

Show
Ignore:
Timestamp:
04/05/11 14:35:14 (8 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Remove lower() calls where possible.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/orasql/__init__.py

    r4422 r4442  
    25282528        # The column creation date is the table creation date 
    25292529        (connection, cursor) = self.getcursor(connection) 
    2530         cursor.execute("select created from all_objects where lower(object_type)='table' and object_name=:name and owner=nvl(:owner, user)", name=self.name.split(".")[0], owner=self.owner) 
     2530        cursor.execute("select created from all_objects where object_type='TABLE' and object_name=:name and owner=nvl(:owner, user)", name=self.name.split(".")[0], owner=self.owner) 
    25312531        row = cursor.fetchone() 
    25322532        if row is None: 
     
    25372537        # The column modification date is the table modification date 
    25382538        (connection, cursor) = self.getcursor(connection) 
    2539         cursor.execute("select last_ddl_time from all_objects where lower(object_type)='table' and object_name=:name and owner=nvl(:owner, user)", name=self.name.split(".")[0], owner=self.owner) 
     2539        cursor.execute("select last_ddl_time from all_objects where object_type='TABLE' and object_name=:name and owner=nvl(:owner, user)", name=self.name.split(".")[0], owner=self.owner) 
    25402540        row = cursor.fetchone() 
    25412541        if row is None: 
     
    26462646        type = url.path[0] 
    26472647        name = url.path[1] 
     2648        if name.lower().endswith(".sql"): 
     2649            name = name[:-4] 
    26482650        # FIXME: This isn't the correct time zone, but Oracle doesn't provide anything better 
    26492651        c = self.dbconnection.cursor() 
    2650         c.execute("select created, to_number(to_char(systimestamp, 'TZH')), to_number(to_char(systimestamp, 'TZM')) from user_objects where lower(object_type)=:type and lower(object_name)=:name", type=type, name=name) 
     2652        c.execute("select created, to_number(to_char(systimestamp, 'TZH')), to_number(to_char(systimestamp, 'TZM')) from user_objects where lower(object_type)=:type and object_name=:name", type=type, name=name) 
    26512653        row = c.fetchone() 
    26522654        if row is None: 
     
    26592661        type = url.path[0] 
    26602662        name = url.path[1] 
     2663        if name.lower().endswith(".sql"): 
     2664            name = name[:-4] 
    26612665        # FIXME: This isn't the correct time zone, but Oracle doesn't provide anything better 
    26622666        c = self.dbconnection.cursor() 
    2663         c.execute("select last_ddl_time, to_number(to_char(systimestamp, 'TZH')), to_number(to_char(systimestamp, 'TZM')) from user_objects where lower(object_type)=:type and lower(object_name)=:name", type=type, name=name) 
     2667        c.execute("select last_ddl_time, to_number(to_char(systimestamp, 'TZH')), to_number(to_char(systimestamp, 'TZM')) from user_objects where lower(object_type)=:type and object_name=:name", type=type, name=name) 
    26642668        row = c.fetchone() 
    26652669        if row is None: