569 |
# TODO: trapped so the designing session can continue, |
# TODO: trapped so the designing session can continue, |
570 |
# TODO: albeit without schema support. |
# TODO: albeit without schema support. |
571 |
|
|
572 |
|
|
573 |
|
# TODO: This is the old, deprecated syntax |
574 |
dataObject = self.editor.connections.getDataObject(conn, "object") |
dataObject = self.editor.connections.getDataObject(conn, "object") |
575 |
|
|
576 |
self.editor.connections.requestConnection(dataObject, conn) |
self.editor.connections.requestConnection(dataObject, conn) |
577 |
|
|
578 |
schema = dataObject.getSchemaByName(self.editor.current.table) |
schema = dataObject._connection.introspector.findone(name=self.editor.current.table) |
579 |
|
|
580 |
|
|
581 |
index = 0 |
index = 0 |
582 |
self.list.DeleteAllItems() |
self.list.DeleteAllItems() |
583 |
if schema: |
if schema: |
584 |
for field in schema.getChildSchema(schema): |
for field in schema.fields(): |
585 |
self.list.InsertStringItem(index, field.name) |
self.list.InsertStringItem(index, field.name) |
586 |
self.list.SetStringItem(index, SCH_TYPE, |
self.list.SetStringItem(index, SCH_TYPE, |
587 |
string.upper(field.datatype[0]) + field.datatype[1:]) |
string.upper(field.datatype[0]) + field.datatype[1:]) |