Skip to content

Commit

Permalink
Mention sqlite test in top-level readme
Browse files Browse the repository at this point in the history
  • Loading branch information
simolus3 committed Nov 24, 2024
1 parent 4012278 commit cf42542
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
This project contains Dart packages to use SQLite from Dart via `dart:ffi`.

The main package in this repository is [`sqlite3`](sqlite3), which contains all the Dart apis and their implementation.
`package:sqlite3` is a pure-Dart package without a dependency on Flutter.
`package:sqlite3` is a pure-Dart package without a dependency on Flutter.
It can be used both in Flutter apps or in standalone Dart applications.

The `sqlite3_flutter_libs` and `sqlcipher_flutter_libs` packages contain no Dart code at all. Flutter users can depend
on one of them to include native libraries in their apps.

`package:sqlite3_test` contains utilities that make integrating SQLite databases into Dart tests easier.
In particular, they patch `CURRENT_TIMESTAMP` and related constructs to return the (potentially faked) time
returned by `package:clock`.

## Example Usage

A file with basic usage examples for pure Dart can be found [here](sqlite3/example/main.dart).
1 change: 1 addition & 0 deletions sqlite3/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ topics:
- sql
- database
- ffi
- sqlite

dependencies:
collection: ^1.15.0
Expand Down
2 changes: 1 addition & 1 deletion sqlite3_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tests by providing a [VFS](https://sqlite.org/vfs.html) that will:

1. Make `CURRENT_TIME`, `CURRENT_DATE` and `CURRENT_TIMESTAMP` reflect the time
returned by `package:clock`.
2. For IO operations, allows providing a `FileSystem` from `package:file`. This
2. For IO operations, allow providing a `FileSystem` from `package:file`. This
includes custom implementations and the default one respecting
`IOOverrides`.

Expand Down
5 changes: 4 additions & 1 deletion sqlite3_test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: sqlite3_test
description: Utilities for accessing sqlite3 databases in unit tests.
description: Integration of fake clocks and other test utilities for SQLite databases.
version: 0.1.0
homepage: https://github.com/simolus3/sqlite3.dart/tree/main/sqlite3_test
repository: https://github.com/simolus3/sqlite3.dart
topics:
- database
- sqlite

environment:
sdk: ^3.5.4
Expand Down

0 comments on commit cf42542

Please sign in to comment.