Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Is Inline::Java suitable for groovy

by afoken (Canon)
on Jan 23, 2019 at 07:55 UTC ( #1228856=note: print w/replies, xml ) Need Help??

in reply to Is Inline::Java suitable for groovy

I notice that the code use jdbc to connect mysql. So is there a way to make use of the class of it from perl?

I may understand you wrong. If so, please ignore this posting.

There is no need to go through Java to connect to MySQL. Perl has at least three ways to do so natively, all start with DBI. The native one is DBD::mysql, but that driver has collected several issues over time. DBD::MariaDB is a fork of DBD::mysql, like MariaDB is a fork of MySQL. DBD::MariaDB can connect to MySQL. The third way is to use DBD::ODBC together with an ODBC manager (comes out of the box with Windows) and an ODBC driver. This has significantly more overhead than the two native drivers.

If you like JDBC, there is also DBD::JDBC that can be used to connect to any database supported by Java, using Java drivers. Of course, this has at least as much overhead as ODBC.


Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re: Is Inline::Java suitable for groovy

Replies are listed 'Best First'.
Re^2: Is Inline::Java suitable for groovy
by xiaoyafeng (Chaplain) on Jan 25, 2019 at 01:23 UTC
    eh, I mean that because the code of groovy use jdbc to connect db, I suppose I can call groovy from Inline::Java)

    I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1228856]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2019-10-18 03:37 GMT
Find Nodes?
    Voting Booth?