Connecting to H2 with Objective-C?

272 views
Skip to first unread message

Steve McLeod

unread,
Sep 18, 2012, 9:39:37 AM9/18/12
to h2-da...@googlegroups.com
I've been wondering about the possibilities of connecting to an H2 database from Objective-C. My vague feeling is that I'd have to write a custom database API in Objective-C that uses a TCP connection to an H2 database.

Does this seem practical? Feasible? Anyone tried something like this?

Steve McLeod

unread,
Sep 18, 2012, 9:42:45 AM9/18/12
to h2-da...@googlegroups.com
I could perhaps create an Objective-C wrapper around H2's Shell tool.

Sergi Vladykin

unread,
Sep 18, 2012, 10:18:06 AM9/18/12
to h2-da...@googlegroups.com
Hi,

What exactly do you want to achieve?
May be you should look at https://code.google.com/p/j2objc/ 
It would be funny if it is possible to port H2 to iOS.

Sergi

Brian

unread,
Sep 18, 2012, 11:07:10 AM9/18/12
to h2-da...@googlegroups.com
Not understanding the platform or if this is for local or remote purposes - I'd suggest writing an app tier as the proxy - perhaps domain specific RESTful services (your own api) that you can use standard/native ObjC apis to access. Perhaps the PostgreSQL ODBC client can be run to connect to remote H2 with the pgsql server running.  Is there an ODBC/jdbc bridge on your platform that could work with the H2 jdbc driver?  Implementing the wire protocol in another language would be a lot of work and potentially exposed/prone to protocol drift/breakage.

Thomas Mueller

unread,
Sep 18, 2012, 2:11:14 PM9/18/12
to h2-da...@googlegroups.com
Hi,

I don't know what are the common ways to access a database in Objective-C. If there are none, I would probably also try J2ObjC - it is a bit similar to the Java to C++ converter I started to implement.

Regards,
Thomas

Steve McLeod

unread,
Sep 19, 2012, 6:11:39 AM9/19/12
to h2-da...@googlegroups.com
Thanks all.

Objective-C (using Cocoa on OS X) seems to lack an equivalent to JDBC. I'm toying with the idea of a native iPad app for accessing a database in a novel way. As H2 is the database I use on a daily basis, it seemed like a good place to start.

I'll look at j2objc, perhaps.

Regards,

Steve 


On Tuesday, 18 September 2012 15:39:37 UTC+2, Steve McLeod wrote:
Reply all
Reply to author
Forward
0 new messages