0
是否有任何解決方案使用Ruby級別的Btrieve/Pervasive db?任何寶石?也許有人有這種事情的一些經驗?Btrieve/Pervasive db和Ruby
或者也許可以通過Jruby使用一些Java庫?我從未使用Jruby
是否有任何解決方案使用Ruby級別的Btrieve/Pervasive db?任何寶石?也許有人有這種事情的一些經驗?Btrieve/Pervasive db和Ruby
或者也許可以通過Jruby使用一些Java庫?我從未使用Jruby
@kell我使用jruby和JDBC Pervasive驅動程序。 簡單示例:
require "java"
module JavaSql
include_package "java.sql"
end
pervasive_driver = Java::JavaClass.for_name("pervasive.jdbc.PervasiveDriver")
conn = JavaSql::DriverManager.getConnection("jdbc:pervasive://host/database","master","")
stmt = conn.createStatement
rs = stmt.executeQuery("select count(*) as class_count from class")
while (rs.next) do
puts rs.get_string("class_count")
end
從來沒有用過,但如果有一個JDBC適配器,那麼使用JRuby是個好主意。使用JRuby非常簡單,請訪問JRuby.org。