Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxDB (the DBMS of SAP) support #100

Open
alexanderadam opened this issue Dec 31, 2018 · 6 comments
Open

MaxDB (the DBMS of SAP) support #100

alexanderadam opened this issue Dec 31, 2018 · 6 comments

Comments

@alexanderadam
Copy link

alexanderadam commented Dec 31, 2018

I'm not sure whether it should be here or as an issue on the crystal-db project but it would be nice to be able to connect to MaxDB. The Ruby gem is using the JDBC driver for that.

@RX14
Copy link

RX14 commented Jan 2, 2019

That ruby gem only works on jruby by loading java code. If nobody has managed to port it to ruby, let alone crystal, I doubt this will happen any time soon.

@alexanderadam
Copy link
Author

alexanderadam commented Jan 3, 2019

Yes, the gem was written by SAP so I guess they wanted to provide compatibility to their database without investing too much resources into Ruby.
On the other hand there's even a driver for PHP that is mostly written in C (see php_maxdb.c and php_maxdb.h). And because Crystal and C are very good friends I wont loose any hope. 😉

But @RX14, independent from that, do you think the place for this issue here is fine or should I rather move this to the crystal-db project? I guess it should be fine here because #70 is here as well?

@RX14
Copy link

RX14 commented Jan 3, 2019

It belongs here. If there's a C driver, then that's good! It can probably be bound.

@alexanderadam
Copy link
Author

alexanderadam commented Jan 3, 2019

For anyone who wants to have a look at it:
Here is the PHP C driver (just in case anything happens with the linked svn repository).

php_maxdb.c.txt
php_maxdb.h.txt

There are some calls that create PHP functions (i.e. PHP_FUNCTION, PHP_FALIAS, ZEND_DECLARE_MODULE_GLOBALS and zend_function_entry) and I guess those have to be rewritten / removed / replaced by Crystal defintions.

@konovod
Copy link

konovod commented Jan 4, 2019

PHP driver is basically a wrapper around a C SDK: http://maxdb.sap.com/documentation/sqldbc/SQLDBC_API
and there is even an .h file available without registration - http://maxdb.sap.com/documentation/sqldbc/SQLDBC_API/SQLDBC__C_8h-source.html

@alexanderadam
Copy link
Author

alexanderadam commented Jan 4, 2019

@konovod you are clearly better in googling than me 😉 👍

Seems also to be available on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants