bind = self.binds[key]
value = self.binds_to_values[bind]
return bind.typeprocess(value, self.dialect)
-
+
+ def keys(self):
+ return self.binds_to_names.values()
+
def __getitem__(self, key):
return self.get_processed(key)
global metadata, table1
metadata = MetaData(engine=testbase.db)
table1 = Table("some_large_named_table", metadata,
- Column("this_is_the_primarykey_column", Integer, primary_key=True),
+ Column("this_is_the_primarykey_column", Integer, Sequence("this_is_some_large_seq"), primary_key=True),
Column("this_is_the_data_column", String(30))
)
metadata.create_all()
table1.insert().execute(**{"this_is_the_primarykey_column":3, "this_is_the_data_column":"data3"})
table1.insert().execute(**{"this_is_the_primarykey_column":4, "this_is_the_data_column":"data4"})
- r = table1.select(use_labels=True).execute()
+ r = table1.select(use_labels=True, order_by=[table1.c.this_is_the_primarykey_column]).execute()
result = []
for row in r:
result.append((row[table1.c.this_is_the_primarykey_column], row[table1.c.this_is_the_data_column]))
(2, "data2"),
(3, "data3"),
(4, "data4"),
- ]
+ ], repr(result)
def test_colbinds(self):
table1.insert().execute(**{"this_is_the_primarykey_column":1, "this_is_the_data_column":"data1"})
print str(x)
if __name__ == '__main__':
- testbase.main()
\ No newline at end of file
+ testbase.main()