Rails on JRuby, activerecord-jdbc-adapter, db2 boolean type

Hi All,

Has anyone worked on project based on Rails on JRuby and db2 

database?

As we know db2 has no native boolean type, I thought

activerecord-jdbc-adapter can convert it automatically. But actually as
Nick
replied, he has not worked on db2, so that this issue has not been taken
care of.

Then every time when I need to assign/fetch I have to convert it

manually: from ‘Yes’, ‘True’, TrueClass, FalseClass… to smallint 1, 0
or
reverse.

I shout here just want to know if anyone encountered same problem or

even better someone has solved it out? Actually I really like to push a
batch for it.

Regards,
Andy

View this message in context:
http://old.nabble.com/Rails-on-JRuby%2C-activerecord-jdbc-adapter%2C-db2-boolean-type-tp26370873p26370873.html
Sent from the JRuby - User mailing list archive at Nabble.com.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

i’m working on a project using JRuby, Rails, and DB2…the db2 database
is a legacy database schema and i don’t bother converting between 0s and
1s or 'Y’s and 'N’s to boolean types

no special gotchas and everything works great, just in case you wanted
the extra reassurance for your project…sorry, this probably isn’t much
help!

Richard F.

Richard,

I am curious. Is the “legacy” database on an IBM i (AS/400) by chance?
That happens to be the DB2 platform I am most familiar with and I have
had a few challenges. Embedded ‘#’ in column names for one.

No real reason for the query. There are only a few DB/2 for i5/OS folks
on the planet using JRuby so I got curious.

Pete

Finegan, Richard [HDS - WC] wrote:

Has anyone worked on project based on Rails on JRuby and db2

or
reverse.

I shout here just want to know if anyone encountered same problem or

even better someone has solved it out? Actually I really like to push a
batch for it.

Regards,
Andy


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Richard,

There's few people on this planet work on JRuby and DB2, and 

fortunately
I meet you.

What I just get is we're working with DB2 9.  So interesting that 

it’s
working for you. Are you working with activerecord-jdbc-adapter?

Richard F. wrote:

manually: from ‘Yes’, ‘True’, TrueClass, FalseClass… to smallint 1, 0
View this message in context:


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


View this message in context:
http://old.nabble.com/Rails-on-JRuby%2C-activerecord-jdbc-adapter%2C-db2-boolean-type-tp26370873p26401350.html
Sent from the JRuby - User mailing list archive at Nabble.com.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

yes, using DB2 9 and activerecord-jdbc-adapter here…its been a pretty
“vanilla” rails experience so far, a testament to the amazing job the
jruby guys have done on jruby and activerecord-jdbc-adapter

Richard F.

i don’t know if they are IBM i machines, the machines themselves are
thousands of miles away so i’ve never seen the actual hardware

unfortunately a few google searches didn’t reveal to me any way to
identify them from the command line either

Richard F.

It sounds like a LUW installation. IBM i has some syntactical
differences to the DB2 most folks know. Since you indicated DB 9 in a
later post, I can pretty much rule out the i.

My rails experience hasn’t been quite as “vanilla” when it comes to
legacy schemas. On current (21st century) schemas, no problems. But
the legacy schemas (30 years old) I work with, embedded # in column
names, multi-column keys and a few other things have made it a
challenge.

Pete

Thanks Pete, you’re right. DB2 is running on IBM i machine. That’s a
problem?

Pete H. wrote:

Pete

Finegan, Richard [HDS - WC] wrote:

-----Original Message-----
database?

I shout here just want to know if anyone encountered same problem

Andy


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


View this message in context:
http://old.nabble.com/Rails-on-JRuby%2C-activerecord-jdbc-adapter%2C-db2-boolean-type-tp26370873p26419415.html
Sent from the JRuby - User mailing list archive at Nabble.com.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

No. Not a problem at all. I have had some issues and put together a
AR-JDBC driver (still not submitted to Nick’s project…yet). There is
a boolean to int cast in the driver (I think).

You can find it here:

http://www.petesworkshop.com/downloads/jdbc_db2i.rb

You’ll need to update jdbc_adapter_spec.rb to list the driver. You might
want to give it a try. It is written for DB2 for i.

Pete

Peter, it’s great! I will try to see in a few weeks after I come over
this
hard time.

Why not submitted to Nick’s project? Any concerns or?

Pete H. wrote:

want to give it a try. It is written for DB2 for i.

It sounds like a LUW installation. IBM i has some syntactical

I am curious. Is the “legacy” database on an IBM i (AS/400) by chance?

is a legacy database schema and i don’t bother converting between 0s

Sent: Monday, November 16, 2009 4:14 AM
As we know db2 has no native boolean type, I thought
taken

http://xircles.codehaus.org/manage_email


View this message in context:
http://old.nabble.com/Rails-on-JRuby%2C-activerecord-jdbc-adapter%2C-db2-boolean-type-tp26370873p26421260.html
Sent from the JRuby - User mailing list archive at Nabble.com.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

No concerns. Just lazy (and busy with other concerns). Java is my
primary development language and I have been working on a project whose
scope continues to grow (although on IBM i I spend a fair amount of time
in ILE RPG). I keep meaning to run a final series of tests on at least
the 2 supported OS versions (V5R4M0 and IBM i 6.1) but I haven’t had the
time.

Pete

Is there an ETA for a new version of the activerecord-jdbc-adapter? I’m
running into the same oracle issues others have logged in JIRA. It’s
preventing us from moving to JRuby 1.4.0.

This email communication and any files transmitted with it may contain
confidential and or proprietary information and is provided for the use
of the intended recipient only. Any review, retransmission or
dissemination of this information by anyone other than the intended
recipient is prohibited. If you receive this email in error, please
contact the sender and delete this communication and any copies
immediately. Thank you.

Try version 0.9.0.1 which should be better with Oracle. What bugs
specifically aren’t working with Oracle for you with 0.9.2?

/Nick

On Thu, Nov 19, 2009 at 4:17 PM, Schultz, Darcy L.
[email protected] wrote:

http://www.encana.com


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

These issues:

http://kenai.com/jira/browse/ACTIVERECORD_JDBC-33
http://kenai.com/jira/browse/ACTIVERECORD_JDBC-17
http://kenai.com/jira/browse/ACTIVERECORD_JDBC-84

all seem to be similar to the issue I created for 0.9.1:

http://kenai.com/jira/browse/ACTIVERECORD_JDBC-26

I tried 0.9.0.1, and there seems to be a problem with it recognizing
that the schema_migrations table already exists. Otherwise, it seems to
work (at least for some rudimentary tests).

If I can find the time I’ll try seeing if I can help out with some
tests. What kind of test infrastructure do I need? Do you actually run
tests against a physical Oracle instance or just verify the generated
text/sql?

Thanks,
Darcy.

On Wed, Dec 2, 2009 at 4:29 PM, Schultz, Darcy L.
[email protected] wrote:

I tried 0.9.0.1, and there seems to be a problem with it recognizing that the schema_migrations table already exists. Otherwise, it seems to work (at least for some rudimentary tests).

If I can find the time I’ll try seeing if I can help out with some tests. What kind of test infrastructure do I need? Do you actually run tests against a physical Oracle instance or just verify the generated text/sql?

Yes, I usually run the tests against a real Oracle. I’ve been using an
express instance setup in a Ubuntu VM. There are some instructions in
test/db/oracle.rb that should give you an idea of what you need.

Thanks for pitching in and helping out with Oracle support! Let me
know if you need any further help getting going.

Cheers,
/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email