From cf425428847ccaea40a8796b53befa9aafacffc2 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Sun, 24 Nov 2024 20:54:09 +0100 Subject: [PATCH] Mention sqlite test in top-level readme --- README.md | 6 +++++- sqlite3/pubspec.yaml | 1 + sqlite3_test/README.md | 2 +- sqlite3_test/pubspec.yaml | 5 ++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aa4a94f0..79087032 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/sqlite3/pubspec.yaml b/sqlite3/pubspec.yaml index 9b2817fd..c35d9997 100644 --- a/sqlite3/pubspec.yaml +++ b/sqlite3/pubspec.yaml @@ -20,6 +20,7 @@ topics: - sql - database - ffi + - sqlite dependencies: collection: ^1.15.0 diff --git a/sqlite3_test/README.md b/sqlite3_test/README.md index d67c059c..5cf99e04 100644 --- a/sqlite3_test/README.md +++ b/sqlite3_test/README.md @@ -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`. diff --git a/sqlite3_test/pubspec.yaml b/sqlite3_test/pubspec.yaml index 2369adaf..12f1517e 100644 --- a/sqlite3_test/pubspec.yaml +++ b/sqlite3_test/pubspec.yaml @@ -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