DuckDB - anyone tried ?

amorosik

Expert
Licensed User

aeric

Expert
Licensed User
Longtime User
I made a first test using JDBC.

B4X:
'Non-UI application (console / server application)
#Region Project Attributes
    #CommandLineArgs:
    #MergeLibraries: True
    #AdditionalJar: duckdb_jdbc-1.0.0
#End Region

Sub Process_Globals
    Private SQL As SQL
End Sub

Sub AppStart (Args() As String)
    Example
    StartMessageLoop
End Sub

Sub Example
    Try
        SQL.Initialize("org.duckdb.DuckDBDriver", "jdbc:duckdb:")
        Dim rs As ResultSet = SQL.ExecQuery("SELECT current_timestamp")
        Do While rs.NextRow
            Log(rs.GetString2(0))
        Loop
    Catch
        Log(LastException)
    End Try
End Sub

Note:
duckdb_jdbc-1.0.0.jar is 63.2MB
sqlite-jdbc is around 12.8MB

Release jar of the above example = 63MB took 45 seconds to compile on my machine.
Similar jar using SQLite in-memory = 12MB took 6 seconds to compile.
 

Attachments

  • DuckDBExample.zip
    932 bytes · Views: 149
Last edited:

peacemaker

Expert
Licensed User
Longtime User
Under Android JDBC example:
Caused by: java.lang.IllegalStateException: Unsupported system architecture

So, curious by online-requests, but huge and non-universal for B4X.
 

Attachments

  • JdbcSQL.zip
    8.3 KB · Views: 152
Last edited:

Daestrum

Expert
Licensed User
Longtime User
it only has these OS's in it
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…