v1.1.0
A release about the databases a script can reach: MongoDB joins the type names, SQLite is documented as
reachable through the generic type, and the jar stops carrying drivers at all. Every layer is exercised in
CI — unit tests, real MySQL, PostgreSQL and MongoDB servers, and a real Paper server running the addon
against each of them.
Added
- MongoDB, as the type name
"MongoDB". Everything the syntax says works on it: all fifteen column
types,whereclauses with every operator (all,anyand negation included), paging, limits,
upsert,insert if absentand the error channel. Its properties are its own:urltakes a bare
host:portor a wholemongodb:///mongodb+srv://connection string,databasenames the database to
use,auth databasenames where the credentials belong, andusername/passwordare separate
properties, so a password containing@,:or/needs no escaping. See
Compatibility for what is deliberately different from SQL. auto incrementon MongoDB is a counter document per key, in a collection named
skript_orm_sequences. A statement that brings its own key raises the counter past it, and registering a
table raises it past the highest key the collection already holds, so a key written here is never handed
out a second time — the behaviour MySQL'sAUTO_INCREMENThas, and the one PostgreSQL needssetval
for.- SQLite, through the generic
"JDBC"type and the driver Paper already carries. Nothing the portable
dialect writes is foreign to it, so a connection to a file works for everything that type supports; what
it refuses (no auto increment, noinsert ... if absent, noupsert, no limit on a write) stays
refused. ./gradlew gendocsgenerates the SkriptHub documentation JSON from the annotations on a disposable
server, and checks it before writing it out. For contributors.
Changed
- The jar carries no database driver. It used to shade and relocate one; now
plugin.ymldeclares
them aslibrariesand Paper downloads them into the server'slibraries/on the first start, from the
server's mirror of Maven Central. Upgrade note: a server that cannot reach that mirror will not load
this plugin at all — the entry is a promise Paper treats as fatal. The way out is the mirror setting
(PAPER_DEFAULT_CENTRAL_REPOSITORY, or theorg.bukkit.plugin.java.LibraryLoader.centralURLsystem
property), or copying alibraries/directory from a server that has started once. What is downloaded
follows the modules the jar carries, so a server only ever fetches the drivers it can use. - The generic
"JDBC"type is documented as what it is: a driver you name yourself, plus portable SQL
("double quoted"identifiers,LIMIT 1for a single row,LIMIT ? OFFSET ?for paging) that refuses
whatever has no portable form rather than guessing at it. - PostgreSQL is covered like the other implementations: an integration suite against a real server, and
the addon driven end to end against it on a real Paper server. statement timeoutis honoured by MongoDB as well, as the driver's socket read timeout: a statement
that never finishes stops holding a connection instead of waiting forever.
Fixed
- A
by idwritten as a literal reached the database unconverted, and reported
UnparsedLiterals must be converted before useinstead of reading the row. - A PostgreSQL
tinyintcolumn could not be read back: the driver refuses aBytefromint2. It is
now read as theSMALLINTit is stored as. - Paging on the generic
"JDBC"type bindsLIMITbeforeOFFSET, the order every server here
accepts. - Value binding on the generic
"JDBC"type uses thesetObjectoverload every driver has, so
SQLite's works for every type. - Raising the version left
plugin.ymlreporting the old one, so a1.1.0jar announced itself as
1.0.0. Found by the server test, which looks for the version it is testing.
Documentation
- Bilingual pages for the type names, the JDBC dialect's SQL, SQLite, the column types' storage, and a
MongoDB section that says what does not survive the move away from SQL — including that adatekeeps
the exact moment there, because BSON has no date-only type. - The generated SkriptHub examples are parsed by the server test, so a documented example that the plugin
cannot read fails CI rather than reaching a reader.
Full Changelog: v1.0.0...v1.1.0