anysql
A Firebase-style keyword API, setup generator, HTTP backend client, and driver layer for SQL and NoSQL databases.
0.3.1
70 downloads/mo
#2836 most downloaded on pub.dev
Azrul16/anysql
What this package is like to depend on
Last release 1 months ago
19 Jul 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 7 of 7 stable releases
Nothing withdrawn
no release was ever pulled
3 months old
7 releases · first in 2026
7 releases in the last 12 months
see the full history below
Release timeline
7 releases · Apr 2026 to Jul 2026Releases
latest 7-
0.3.119 Jul 2026Release notes
Open source →Added
- Added optional driver capability declarations for transactions, returned write rows, upserts, and native aggregation.
- Added
AnySqlUnsupportedExceptionfor optional operations unavailable on a driver, backend, or store dialect. - Added
AnySqlStore.transaction()with a transaction-scoped keyword store. - Added store field projection plus
count()andexists()query helpers. - Added bulk
addAll()writes andwhereNotInfilters for SQL and MongoDB.
Changed
- Unsupported MongoDB and HTTP backend transactions now throw
AnySqlUnsupportedExceptioninstead of a connection exception.
Fixed
- Declared the external-integration test tag so local test runs are warning-free.
- Standardized driver selection, connection lifecycle, and completed transaction failures on their specific exception types.
- Made offset-only store queries valid for MySQL and SQLite by emitting their dialect-specific unlimited limit clauses.
- Changed SQLite document
setoperations to useON CONFLICT DO UPDATEinstead of the delete-and-insert behavior ofINSERT OR REPLACE.
-
0.3.031 May 2026Release notes
Open source →Added
- Added
AnySqlStore.close()plus generatedwithStoreandwithBackendStorehelpers for safer connection cleanup. - Added GitHub Actions CI with live PostgreSQL, MySQL, and MongoDB service-container smoke tests.
Changed
- Kept core contracts, HTTP backend, and built-in direct drivers in the single
anysqlpackage. - Updated the Dart SDK constraint to
^3.10.0for modern SQLite native-asset support.
Fixed
- Made the SQLite driver return rows for statements that use
RETURNING, while ignoringreturninginside comments and string literals. - Added clear MySQL config validation for
collationandtimeoutMsdriver options.
- Added
-
0.2.226 May 2026Release notes
Open source →Added
- Added
AnySqlStore, a Firebase-style keyword API overAnySqlConnectionwithcollection,where,orderBy,limit,offset,doc,add,set,update, anddeleteoperations for SQL and MongoDB dialects. - Added
connection.store(dialect: ...)plusfirst()helpers for easier single-row and single-document reads. - Improved
dart run anysql/dart run anysql setupso setup asks only for one included database and generates a focused options file with store helpers. - Made
dart run anysqla short alias for interactive setup. - Reworked README and example docs so the keyword-store workflow is easier to learn on pub.dev and GitHub.
- Added keyword-store examples and SQLite coverage for real CRUD behavior.
- Added
-
0.2.123 May 2026Release notes
Open source →Added
- Added
dart run anysql setupfor interactive options file generation after installing the package. - Added
AnySqlParametershelpers for named, positional, and document-style query parameters. - Added opt-in live smoke tests for PostgreSQL, MySQL, and MongoDB drivers.
Changed
- Removed advertised web platform support while the package includes native direct-driver dependencies.
- Clarified transaction behavior and the shared contract's limits around nested transactions and savepoints.
- Reused a shared internal statement preview helper across built-in drivers.
- Updated README, driver guide, example docs, and examples for the new setup and parameter helper flows.
Fixed
- Fixed HTTP backend client ownership so internally managed clients are scoped per connection while injected clients remain caller-owned.
- Changed config validation failures to throw
AnySqlConfigException. - Hardened HTTP backend response decoding for malformed rows, metadata, and affected row counts.
- Added
-
0.2.004 May 2026Release notes
Open source →Added
- Added
package:anysql/anysql_drivers.dartwith built-in real driver adapters for PostgreSQL, MySQL, SQLite, and MongoDB. - Added
PostgresAnySqlDriverbacked bypackage:postgres. - Added
MysqlAnySqlDriverbacked bypackage:mysql_client. - Added
SqliteAnySqlDriverbacked bypackage:sqlite3. - Added
MongodbAnySqlDriverbacked bypackage:mongo_dart. - Added real in-memory SQLite coverage for query and transaction behavior.
- Added generated-file analysis tests so generated options files must compile.
- Added CLI integration tests for
init,configure, and invalid SQLite flags. - Added
doc/driver_guide.mdwith built-in driver usage examples. - Added a driver capability matrix to the README for PostgreSQL, MySQL, SQLite, and MongoDB.
- Added clearer error and debugging documentation for
AnySqlExceptionsubclasses. - Added ecosystem notes that explain how
anysqldiffers from ORMs, query builders, and direct database drivers. - Added SQLite tests for wrapped query failures and closed-connection behavior.
- Added MongoDB adapter support for
insertMany,updateMany,replaceOne,deleteMany, andcount. - Added
AnySqlHttpBackendClientfor JSON HTTP backend/proxy connections. - Added tests for HTTP backend requests, result decoding, missing backend URLs, failed HTTP responses, and closed backend connections.
Changed
- Updated README usage examples for the built-in drivers.
- Added README badges for pub.dev, Dart SDK, license, and GitHub.
- Reworked the README into a more practical getting-started guide with a copyable in-memory SQLite example.
- Updated the example to include a real SQLite connection alongside the fake direct and backend/proxy examples.
- Improved the example README so users can tell which parts use fake demo clients and which part uses a real driver.
- Updated the runnable example output to show the direct-driver, backend/proxy, and real SQLite patterns separately.
- Wrapped built-in driver query failures in
AnySqlQueryExceptionwith a short statement preview. - Wrapped closed PostgreSQL, MySQL, and MongoDB connection usage in
AnySqlConnectionException. - Changed unsupported MongoDB transactions to throw a typed
AnySqlConnectionExceptionwith a stable explanation. - Completed the example and test fake transaction implementations so no sample connection code is left as an unimplemented stub.
- Replaced the unused
shelfdependency withhttpfor the built-in backend client.
Fixed
- Prevented SQLite options generation from emitting invalid network-only constructor arguments.
- Added CLI validation for unsupported SQLite options like
--host,--port,--username,--password-env, and--ssl. - Fixed documentation snippets that used built-in drivers without showing the
required
package:anysql/anysql_drivers.dartimport. - Clarified that Flutter mobile and web apps should use a backend/proxy instead of shipping production database credentials.
- Clarified SQLite positional parameter usage with
parameters: {'values': [...]}.
- Added
-
0.1.130 Apr 2026Release notes
Open source →Added
- Added
dart run anysql initto generate a starterlib/anysql_options.dartfile with editable dummy options for PostgreSQL, MySQL, SQLite, and MongoDB. - Added
AnySqlOptionsFile.byDialectto the generated starter file.
Fixed
- Escaped generated Dart string literals more safely for values containing dollar signs, quotes, and control characters.
- Clarified CLI help text for
initandconfigureclass-name defaults.
- Added
-
0.1.030 Apr 2026Release notes
Open source →Initial public release of
anysql.Added
- Core
AnySqlclient for direct driver lookup and connection opening. AnySqlConfigwith convenience constructors for PostgreSQL, MySQL, SQLite, MongoDB, and custom driver options.- Driver, connection, transaction, backend client, result, and exception contracts for database packages to implement.
- Options generator available through
dart run anysql configure. - Generated
AnySqlOptionssupport for direct drivers and backend/proxy clients. - Defensive copying for config options and result rows.
- Public example covering direct and backend connection flows.
Security
- Generated setup files use
String.fromEnvironmentfor passwords through--password-env. - The CLI intentionally does not support inline password generation.
- Core