On 12/01/2011 18:29, Richard Cyganiak wrote:
> Hi Christian,
> This is cool stuff!
>
Thanks
> Can you explain a bit about what's going on? Why does it fail on ODBC without 
> these changes?
The problem is the JDBC function these methods depend on are not 
supported by the OBDC - JDBC bridge.
> What's the exception that would be thrown on the foreignKeys() and 
> primaryKeyColumns() methods?
[Microsoft][ODBC Driver Manager] Driver does not support this function

> Why does the getColumns(null, schema, table, column) call fail for ODBC?
Sorry ignore this. Could be due to bad data. That appears to be running 
fine with a cleaned up dataset.
> Where you have this.schema.getColumns(null, null, column.tableName(), null), 
> would it still work if you used column.schemaName() instead of null? I assume 
> that the schema name would be null anyways ...
>
> I'm asking because I'd like to figure out whether these changes can be 
> incorporated without causing issues when other JDBC drivers are used.
If you are looking at incorporating I will write a cleaner version.
Extending DatabaseSchemaInspector to offer alternative versions for the 
two functions rather than waiting for exceptions to happen.
> Best,
> Richard
>
>
> On 12 Jan 2011, at 16:43, Christian Brenninkmeijer wrote:
>
>> Hi everyone,
>>
>> I have done some hacks that allow a limited generate mappings over an
>> ODBC connection.
>>
>> These are in
>> de.fuberlin.wiwiss.d2rq.dbschema.DatabaseSchemaInspector
>>
>> public List foreignKeys(RelationName tableName, int direction) {
>> ....
>>          } catch (SQLException ex) {
>>                         return new ArrayList();
>>           }
>>
>>      public List primaryKeyColumns(RelationName tableName) {
>> ....
>>          } catch (SQLException ex) {
>>                         return new ArrayList();
>>           }
>>
>> .....
>>
>> The generated mapping is missing links and stuff that the direct JDBC
>> option offers but is better than nothing.
>> You also have to fill the primarky keys in by hand or run code to quess
>> the primary key. (I will post another email about that)
>>
>> --
>> Dr Christian Brenninkmeijer
>> Department of Computer Science
>> University of Manchester
>>
>>
>> ------------------------------------------------------------------------------
>> Protect Your Site and Customers from Malware Attacks
>> Learn about various malware tactics and how to avoid them. Understand
>> malware threats, the impact they can have on your business, and how you
>> can protect your company and customers by using code signing.
>> http://p.sf.net/sfu/oracle-sfdevnl
>> _______________________________________________
>> d2rq-map-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1191 / Virus Database: 1435/3375 - Release Date: 01/12/11
>


-- 
Dr Christian Brenninkmeijer
Department of Computer Science
University of Manchester



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1191 / Virus Database: 1435/3376 - Release Date: 01/12/11

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
d2rq-map-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to