On Monday, August 11, 2014 6:10:25 AM UTC-7, Wesley Staples wrote:
>
> I would like to start work on a DB2 UDB adapter. We run DB2 on an iSeries
> which has subtle differences between DB2 for Linux/Windows.
>
> Before I get started I have a few questions regarding development.
>
>
>
> 1.) How can I use sequel from GitHub?
>
> I have cloned the git hub repo locally. How can I "require" it in my
> scripts? Do I even need to bother for rspec tests?
>
The rspec tests will automatically use the current checkout.
2.) I would like to start with testing.
> I see there is a test suite "spec_db2" but this is not meant for ODBC. Are
> there any ODBC rspec tests available? if not what would be the best way to
> get started creating some?
>
There aren't specific tests for the odbc adapter. In general the
adapter/integration specs test database support, not adapter support. You
generally don't want to create specs that are specific to an adapter and
not a database. For example, if you have specs that should run on DB2
connected via ODBC, you should add those to the db2 specs, with the
appropriate spec guard (if db.adapter_scheme == :odbc).
> 3.) How can I connect with a URI using drvconnect? This is the connection
> string I have to use from windows:
>
> DB2 = Sequel.odbc(:drvconnect=>"driver={Client Access ODBC Driver
> (32-bit)};system=GBAS400;uid=username;password=password;", :db_type =>
> 'db2')
>
> for example if I wanted to use sequel to dump the current schema how could
> I format the above into a valid connection string?
>
You can just add that line of code to a spec/spec_config.rb file, and that
is the database that will be used for all adapter/integration specs.
> I don't have a plan yet I might not write a new adapter the current DB2 is
> very close (in fact I use it in production) I might just edit the current
> odbc / db2 "grammar". Any help is appreciated.
>
A simple fix may be to just extend the database is a module that changes
the SQL produced. If you can describe the differences between DB2 on
Windows/Linux and DB2 on iSeries, I could probably help with that. I'm
also open to adding an option to the shared DB2 support so that you can
switch between the two.
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.