Beispiel #1
0
    def tst_test_rows_with_index1(p_count):
        ret = {}
        rows = StaticDataLayer.execute_sp_rows(
            "select tst_test_rows_with_index1(%s::int)", p_count)
        for row in rows:
            if row['tst_c01'] in ret:
                if row['tst_c02'] in ret[row['tst_c01']]:
                    ret[row['tst_c01']][row['tst_c02']].append(row)
                else:
                    ret[row['tst_c01']][row['tst_c02']] = [row]
            else:
                ret[row['tst_c01']] = {row['tst_c02']: [row]}

        return ret
Beispiel #2
0
    def tst_test_rows_with_key1(p_count):
        ret = {}
        rows = StaticDataLayer.execute_sp_rows(
            "select tst_test_rows_with_key1(%s::int)", p_count)
        for row in rows:
            if row['tst_c01'] in ret:
                if row['tst_c02'] in ret[row['tst_c01']]:
                    if row['tst_c03'] in ret[row['tst_c01']][row['tst_c02']]:
                        raise Exception('Duplicate key for %s.' % str(
                            (row['tst_c01'], row['tst_c02'], row['tst_c03'])))
                    else:
                        ret[row['tst_c01']][row['tst_c02']][
                            row['tst_c03']] = row
                else:
                    ret[row['tst_c01']][row['tst_c02']] = {row['tst_c03']: row}
            else:
                ret[row['tst_c01']] = {row['tst_c02']: {row['tst_c03']: row}}

        return ret
Beispiel #3
0
 def tst_test_rows1(p_count):
     return StaticDataLayer.execute_sp_rows(
         "select tst_test_rows1(%s::int)", p_count)
Beispiel #4
0
 def tst_test_rows1_with_lob(p_count, p_blob):
     return StaticDataLayer.execute_sp_rows(
         "select tst_test_rows1_with_lob(%s::int, %s::bytea)", p_count,
         p_blob)
Beispiel #5
0
 def tst_test_percent_symbol():
     return StaticDataLayer.execute_sp_rows(
         "select tst_test_percent_symbol()")