SQLiteLib
2.0.0This library will make using SQLite super easy! Ditch those YML files, switch to SQLite!
2.0.0latestSQLiteLib 2.0.03 weeks ago SQLiteLib 2.0.0 The big face lift! Important · Now requires Java 17 and Spigot/Paper 1.18+. · Plugins built for 1.x keep working without changes. Every old method still exists with the same signature. Bug fixes · queryMultipleRows returned the same list for every column. Each column now gets its own list. · executeStatement reported successful SELECT statements as failures. It now returns true for any statement that succeeds. · Every query closed and reopened the database connection. The connection now stays open and is shared safely between threads. · /sl queryvalue crashed on any value that wasn't text (numbers, etc.). · Commands printed the usage line after every use. · Databases were never closed on shutdown. They are now closed cleanly, after any pending async work finishes. · Re-initializing a database with the same name leaked the old connection. · New databases no longer get an unused test table. · Error messages no longer say "MySQL". · Database names can no longer contain paths (e.g. ../). · hookSQLiteLib() without arguments now exists, as the old docs showed. New for developers · Parameterized queries using ? placeholders (no more SQL injection): query, queryFirst, queryScalar, queryColumn, exists, update, and insert (returns the new row id). · Typed rows: getString, getInt, getLong, getDouble, getBoolean, getUUID, getEnum, or map rows straight to your own objects. UUIDs, enums and booleans are converted automatically. · Async API: queryAsync, updateAsync, supplyAsync and runAsync. Each database has its own worker thread. Use SQLiteLib.mainThread(plugin) to get back to the main thread. · Transactions: all-or-nothing changes with transaction(...) and transactionResult(...). · Batch inserts: insert thousands of rows in one fast transaction. · Schema migrations: migrate("step 1", "step 2", ...). Each step runs only once per server, so updating your tables between plugin versions is painless. · Key/value stores: db.keyValue("coins") is a drop-in replacement for data.yml files, with atomic increment for balances and stats. · Live backups, vacuum, read-only mode, getTables, tableExists, columnExists, getSchemaVersion. · Per-plugin databases: open(this, "data") stores the file in your own plugin folder, so names never clash with other plugins. · Faster defaults: WAL mode, foreign keys enforced, and a 5 second busy timeout. · Works outside Minecraft: SQLite.open(file) in any Java project. · Available on JitPack for Maven and Gradle, with sources and javadocs. New for server owners · /sl list: every loaded database with its size and owning plugin. · /sl info <db>: file, size, schema version, tables and row counts. · /sl query <db> <sql>: run a read-only query and see the results as a table. · /sl backup <db>: live backup to plugins/SQLiteLib/backups while the server runs. · /sl vacuum <db>: compact the database file. · Tab completion for subcommands and database names. · All SQL from commands runs off the main thread, so no lag spikes. · New permissions: sqlite.command.read, sqlite.command.write, sqlite.command.admin. sqlite.use still grants everything. All default to op. Deprecated · queryValue, queryRow and queryMultipleRows still work, but use the new parameterized methods instead. · The Error and Errors classes are no longer used and will be removed in a future major version. Heads up If your tables declare foreign keys, they are now enforced. Inserts that break them will fail instead of being silently accepted.1.3Per-Plugin Folder SavingJun 3, 2018 ADDED: - Implementation to initialize database with a specified plugin location. Read description for instructions.1.2Initialize Database fixesJun 2, 2018 FIXES: - Initializing Database not executing initial create statement.1.1Link UpdateJan 2, 2018 Directly uploaded the file,1.0URL fix (Ignore)Nov 28, 2017 Ignore this update!
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
26.2MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.9MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
4.7MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta