Hi people.
Thanks for the great job. A RAD tool for Graphical, Desktop applications 
was really missing in the Unix/Linux world.
I have a small suggestion.
Since i come from the old Micrososft MSQL/MSAccess/VisualBasic 
development environment, i started developing applications
using double quoted table names in Postgres (e.g.: "pgCustomersData").
Unfortunately this brings some restrictions in using wizards.

The following code, for example, would produce an error in the case a 
table named pgCustomersData exists in the database:

    def getTables(self, cursor, includeSystemTables=False):
        query = ["SELECT schemaname||'.'||tablename AS tablename"
                " FROM pg_tables WHERE"]
        if not includeSystemTables:
            query.append("(schemaname NOT LIKE 'pg_%' AND "
                    "schemaname NOT LIKE 'information%') AND")
        query.append("has_schema_privilege(schemaname, 'usage') AND "
                "has_table_privilege(schemaname||'.'||tablename, 'select')")
        cursor.execute(' '.join(query))
        return tuple(record["tablename"] for record in cursor.getDataSet())


The error would be:

    ERROR: The tabale pgcustomersdata doesn't exists.

Changing the code like this, would allow Capital Letters and white 
spaces in both in schema and in table names.

        query.append("has_schema_privilege('"'||schemaname||'"', 
'usage') AND "
                
"has_table_privilege('"'||schemaname||'"."'||tablename||'"', 'select')")

This code fixes the getTables but AppWizard fails to build the 
bizObjects nevertheless.
I haven't tested it thoroughly.

Just a suggestion for future development.

Thanks again for the great work

Raffaele Candeliere




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to