electricsql 0.8.2
electricsql: ^0.8.2 copied to clipboard
A Dart implementation for ElectricSQL (electric-sql.com) client.
0.8.2 #
- Deprecation notice. Please refer to the README for more information.
0.8.1 #
- Code based on official Typescript client v0.12.1.
- Fail if closing the websocket while the socket connection is being established.
- Properly abort the process connection with retries if closing the client with
disconnect
.
0.8.0 #
- Code based on official Typescript client v0.12.0.
- The DevTools now supports inspecting the database tables and running arbitrary queries.
0.7.1 #
- A DevTools extension for Electric is now included to check the status of the Electric service, inspect the electrified tables and check the status of the shape subscriptions. To know more about DevTools and how to run them on your IDE you can check these resources: DevTools and DevTools extensions.
0.7.0 #
- Code based on official Typescript client v0.11.0, v0.11.1, v0.11.2 and v0.11.3.
- Support for using Electric with Postgres on the client. This would be a way of syncing 2 different Postgres databases, one on the client and the main one on the Electric service. You can see an example on the todos app in the
../drift/connection/native.dart
file. Right now this only works on a Dart io platform using a "real" Postgres database. If we ever get aPGLite
equivalent for Dart, it would be automatically supported. - BREAKING: The
electrify
function now takes a parameterElectricMigrations
instead ofList<Migration>
, also autogenerated by the CLI. - Add a escape hatch method
syncTableRaw
to allow creating a shape subscription manually, without thedrift
API. UsingsyncTable
is still recommended. - Fix error when the websocket close code or reason are null.
0.6.0 #
- Code based on official Typescript client v0.10.0 and v0.10.1.
- BREAKING: Compatible with the Electric service v0.10.0+
- BREAKING: The
syncTables
function has been removed in favor of the new Shapes feature and the functionsyncTable
, which can be customized withWHERE
clauses or to include other related tables. More information in the README. - BREAKING: DateTimes obtained for the Postgres types TIME, TIMESTAMP and DATE are now always in UTC. These types don't store timezone information, so for consistency they are in UTC when reading. For example, if you insert "2023-01-15 08:30" (local), "2023-01-15 08:30+00" (UTC) or "2023-01-15 08:30-05" (with offset); timezone is stripped and all of them will be read as "2023-01-15 08:30" (UTC).
- BREAKING: Now the
ElectricClient
class has a generic type with the type of the drift database (ElectricClient<AppDatabase>
), to improve type safety and integration. - Improved type mapping between a Postgres database and the drift Electric client in a Dart backend.
0.5.2 #
- Code based on official Typescript client v0.9.3 and v0.9.4
- The drift schema now supports postgres, allowing reuse in a Dart backend. A simple backend example is provided in the todos demo. Thanks to @simolus3 for the contribution.
0.5.0 #
- Code based on official Typescript client v0.9.0
- The CLI from
electricsql_cli
has been greatly improved, now supporting running the Electric and Postgres services locally behind the scenes, simplifying the structure of the project. Checkout the Quickstart section in the README for more details.
0.4.0 #
0.3.0 #
- Code based on official Typescript client v0.7.0
- Breaking change: Compatible with the Electric service v0.7.0+
- Added support for additional data types from Postgres, replicated in the local SQLite and mapped as Dart types in the
drift
schema:uuid
int2
int4
float8
date
time
timetz
timestamp
timestamptz
- Automatic drift schema generation using the
electricsql_cli
package. No longer needed to manually replicate the Postgres schema indrift
.
0.2.0 #
0.1.2 #
- Code based on official Typescript client v0.5.2-dev f52f25f369e016183cc5bffca2005d65bf7cca12
0.1.0 #
- Initial version.