« Edit and Update for S… | Home | MBS Xojo Plugins, ver… »

DuckDB

On the weekend, there happened something on the Xojo forum. 29th January Hans-Norbert Gratzal pointed to DuckDB.org to ask about whether there is a plugin for this. DuckDB is a column based database, which is different than the row based ones like SQLite. Depending on what you do, column based databases can be a lot of quicker to scan lots of records for values in one column. Your mileage may vary, but if you have both available, you can do comparisons.

For fun I started on Saturday to code a few classes and work my way through it. That continued on Sunday. A real nice weekend coding project and I enjoyed it very much. Plugin creator Björn Eiríksson from Island also jumped right on this and released this implementation yesterday. Nice work.

The MBS implementation comes with 21.1pr1 pre-release later today. Build process for 500+ plugin parts takes some time. But feel free to check our classes: DuckDatabaseMBS, DuckConnectionMBS, DuckResultMBS and DuckPreparedStatementMBS. I decided to stick close to the original API and not do a wrapper using Xojo's database API. We may in future add it to MBS Xojo SQL Plugin, but for now, it stays separate due to its size.

The plugin includes pre-built libraries for macOS, iOS, Windows and Linux 32-bit ARM. Currently Linux 32/64bit on Intel is missing. But we built-in the LoadLibrary function to load the library coming with your distribution. The plugin is still big with 23 MB compressed. About 7 MB per target in average.

Since I like variant, I got you Bind and Value functions to read/write values with variant class and automatically handles boolean, integer, floating point and text data types. We got functions to read value as Date or DateTime values. Also we have more native functions to read the components for Date, Time, Timestamp, Huge Ints (128 bit) and Intervals.

The whole thing is early. DuckDB will evolve and we may enhance the plugin classes. Let us know your ideas and please don't hesitate to contact us with questions. The biggest plugin in space...
01 02 21 - 11:38