skript-orm

Addon skript-orm 1.3.0

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

1.3.0 update notes
Added

  • Raw statements: write the SQL or command yourself. execute query stores rows, execute update stores a count, and execute command is for MongoDB. The statement is sent as written — not parsed, not compared with a registered table, not translated between backends — which is what makes migrations, indexes and vendor-specific syntax expressible. Values are bound to ? placeholders by with; there is no other safety net. See Raw statements.
Fixed
  • A connection property nothing reads is now refused instead of dropped. A mistyped property did nothing, and database: on a MySQL connection reached a server with no default database and failed later, at an unrelated statement. It is now reported on the line that declares the connection, naming what the implementation does read.
  • A registration that no longer matches its table is now refused. A column added to a script never reached a table that already existed, so the first statement to use it failed with the backend's Unknown column .... Registration now compares columns, types, sizes, not null and the primary key, and reports on the declaration instead.
Changed
  • Startup reports which database implementations loaded, and names the reason for one that failed to load instead of passing in silence.
1.2.0 — a script can see more of what happened
Added: a write can report the rows it affected. End a statement with and store affected rows in {_rows}: 0 means it ran and matched nothing, while an unset variable means no statement answered — which is what makes a read-check-write safe without a transaction.
Changed: every statement now waits for its work, so the next line reads what the previous one wrote and a failure the database reported always reaches last database error. and wait is still accepted and does nothing, so no existing script has to change.
Fixed: a failure the database reports now really ends its transaction; a whole number that does not fit its column is refused instead of stored as a different number (5000000000 no longer becomes 705032704); MySQL's insert if absent no longer swallows errors other than a duplicate key; a refused read clears its result variable.
adds MongoDB, SQLite, PostgreSQL support:
write database "MongoDB" and the statements, types and limits behave the way they already do on MySQL. SQLite is documented as reachable through the generic "JDBC" type, PostgreSQL's tinyint columns read back as they should, and the jar no longer carries a database driver — Paper downloads the ones a bundled implementation needs on the server's first start.