Skip to content

Releases: NhanAZ-Libraries/SimpleSQL

SimpleSQL v1.1.1

Choose a tag to compare

@NhanAZ NhanAZ released this 10 Oct 22:54
v1.1.1
4a9a5b1

Changes

  • Confirm single-session and paired SQL saves by reading the expected rows on the same libasynql worker before updating in-memory sessions or queuing YAML mirrors.
  • Treat a connector callback with missing or mismatched rows as a failed save. This covers prepared MySQL statements that an affected libasynql revision can incorrectly report as successful.
  • Keep paired writes atomic as one SQLite or MySQL InnoDB statement.

Validation

  • SimpleSQL source CI: locked Composer dependencies, PHPStan max, PHP lint, SQL parser checks, SQLite/MySQL InnoDB writes and injected failure tests.
  • SimpleEconomy consumer CI: pinned DevTools PHAR build, producer and example PHPStan max, artifact verification, and isolated Axolotl-PM 5.49.1 SQLite and MySQL runtime smoke tests with successful and rejected paired transfers.

The SQL resource files changed. Bundle the matching resources/simplesql/mysql.sql and resources/simplesql/sqlite.sql with this source revision. This virion is distributed as source; no standalone plugin PHAR is attached. Retain the previous release and data backups for rollback.

SimpleSQL 1.1.0

Choose a tag to compare

@NhanAZ NhanAZ released this 10 Oct 22:34
v1.1.0
2eb6621

SimpleSQL 1.1.0 adds saveSessionPair() for a single-statement, two-session write on SQLite and MySQL InnoDB. Both in-memory balances are applied only after SQL confirms success. A failed statement leaves both sessions unchanged; YAML mirrors are queued after success.

The SQL resource files must come from the same SimpleSQL revision as the virion source. Existing MySQL tables must use InnoDB; the API rejects paired writes on unsupported engines. The table schema is unchanged.

Verification: tag CI 38091865948 passed locked Composer validation, PHPStan at maximum level, SQL regression tests including injected second-row failures on SQLite and MySQL InnoDB, and PHP lint. SimpleEconomy consumer CI 38091745995 passed PHAR build and verification, PHPStan max for producer and example, and isolated Axolotl-PM 5.49.1 runtime checks for successful paired writes and rollback. Connected-player gameplay and live MySQL plugin runtime remain unverified.

Rollback: rebuild a consumer using the previous SimpleSQL v1.0.1 source and matching SQL resources. Back up the database and YAML directory before changing deployed consumer builds.

SimpleSQL 1.0.1

Choose a tag to compare

@NhanAZ NhanAZ released this 10 Oct 00:28
v1.0.1
1dba602

SimpleSQL 1.0.1

This source release improves the safety of SQL and YAML session loading and saving for plugins that bundle SimpleSQL as a virion.

  • SQL read failures and malformed rows no longer open an empty session.
  • Offline YAML edits are exposed only after their SQL synchronization succeeds.
  • Saves for one session are ordered, and newer edits remain dirty until saved.
  • A failed save keeps the session open. If SQL still fails during shutdown, SimpleSQL attempts to write a separate .recovery.yml snapshot for manual restoration.
  • Session IDs are encoded before use in YAML filenames. Ordinary player name filenames remain unchanged.
  • The library now has locked PHPStan max analysis, regression scripts, CI and Dependabot configuration.

The optional third openSession() callback reports load failures. Existing two argument calls remain valid. The manifest still requires API 5.0.0 and PHP 8.1 or newer. CI analyzes the pinned Axolotl-PM 5.49.1 source. A staged SimpleEconomy PHAR containing this source and libasynql was built with DevTools and passed a console-driven SQLite save on Axolotl-PM 5.49.1. Other server releases, MySQL and connected player behavior have not been verified here.

Commit CI and tag CI passed Composer validation, PHPStan max, regression scripts and PHP lint.

For an upgrade, rebuild the consumer PHAR with the tagged SimpleSQL source and keep its SQL resources and libasynql virion. Back up the SQL database and YAML directory first. Roll back by rebuilding with the prior SimpleSQL source and restoring the matching data backup if needed. Recovery snapshots are not loaded automatically.