Skip to content

Commit

Permalink
[sqflite_common] v2.5.4+6 fix doc canonical issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Nov 21, 2024
1 parent 8ffa1cd commit dd468e9
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion sqflite_common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 2.5.4+5
## 2.5.4+6

* Remove dependency on `dart:html`
* Add more keywords to escape from sqlite.org
Expand Down
4 changes: 2 additions & 2 deletions sqflite_common/lib/sqflite.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export 'sqlite_api.dart';
/// database version
///
/// In the first case where [onCreate] is not specified, [onUpgrade] is called
/// with its [oldVersion] parameter as `0`. In the second case, you can perform
/// with its [OnDatabaseVersionChangeFn.oldVersion] parameter as `0`. In the second case, you can perform
/// the necessary migration procedures to handle the differing schema
///
/// [onDowngrade] is called only when [version] is lower than the last database
Expand Down Expand Up @@ -99,7 +99,7 @@ Future<Database> openReadOnlyDatabase(String path,
///
/// Note for iOS and non-Android platforms: Using `path_provider` is recommended to get the
/// databases directory. The most appropriate location on iOS would be
/// the Library directory that you could get from the [`path_provider` package]
/// the Library directory that you could get from the `path_provider` package
/// (https://pub.dev/documentation/path_provider/latest/path_provider/getLibraryDirectory.html).
///
Future<String> getDatabasesPath() => databaseFactory.getDatabasesPath();
Expand Down
23 changes: 16 additions & 7 deletions sqflite_common/lib/sqlite_api.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/// {@canonicalFor sqflite_debug.SqfliteDatabaseFactoryDebug}
/// {@canonicalFor constant.inMemoryDatabasePath}
/// {@canonicalFor constant.sqfliteLogLevelNone}
/// {@canonicalFor constant.sqfliteLogLevelSql}
/// {@canonicalFor constant.sqfliteLogLevelVerbose}
/// {@canonicalFor exception.DatabaseException}
/// {@canonicalFor sql_builder.ConflictAlgorithm}
library;

import 'dart:async';
import 'dart:typed_data';

Expand Down Expand Up @@ -354,13 +363,13 @@ typedef OnDatabaseCreateFn = FutureOr<void> Function(Database db, int version);
/// Post initialization should happen here.
typedef OnDatabaseOpenFn = FutureOr<void> Function(Database db);

/// Prototype of the function called before calling [onCreate]/[onUpdate]/[onOpen]
/// Prototype of the function called before calling [OpenDatabaseOptions.onCreate]/[OpenDatabaseOptions.onUpgrade]/[OpenDatabaseOptions.onOpen]
/// when the database is open.
///
/// Post initialization should happen here.
typedef OnDatabaseConfigureFn = FutureOr<void> Function(Database db);

/// to specify during [openDatabase] for [onDowngrade]
/// to specify during [openDatabase] for [OpenDatabaseOptions.onDowngrade]
/// Downgrading will always fail
Future<void> onDatabaseVersionChangeError(
Database db, int oldVersion, int newVersion) async {
Expand All @@ -374,7 +383,7 @@ Future<void> __onDatabaseDowngradeDelete(

/// Downgrading will delete the database and open it again.
///
/// To set in [onDowngrade] if you want to delete everything on downgrade.
/// To set in [OpenDatabaseOptions.onDowngrade] if you want to delete everything on downgrade.
final OnDatabaseVersionChangeFn onDatabaseDowngradeDelete =
__onDatabaseDowngradeDelete;

Expand Down Expand Up @@ -416,7 +425,7 @@ abstract class OpenDatabaseOptions {
/// database version
///
/// In the first case where [onCreate] is not specified, [onUpgrade] is called
/// with its [oldVersion] parameter as `0`. In the second case, you can perform
/// with its [OnDatabaseVersionChangeFn.oldVersion] parameter as `0`. In the second case, you can perform
/// the necessary migration procedures to handle the differing schema
///
/// [onDowngrade] is called only when [version] is lower than the last database
Expand Down Expand Up @@ -509,9 +518,9 @@ abstract class Batch {
/// and the failure are ignored (i.e. the result for the given operation will
/// be a DatabaseException)
///
/// During [Database.onCreate], [Database.onUpgrade], [Database.onDowngrade]
/// (we are already in a transaction) or if the batch was created in a
/// transaction it will only be commited when
/// During [OpenDatabaseOptions.onCreate], [OpenDatabaseOptions.onUpgrade],
/// [OpenDatabaseOptions.onDowngrade] (we are already in a transaction) or if
/// the batch was created in a transaction it will only be commited when
/// the transaction is commited ([exclusive] is not used then).
///
/// Otherwise, sqflite will start a transaction to commit this batch. In rare
Expand Down
2 changes: 1 addition & 1 deletion sqflite_common/lib/utils/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int? firstIntValue(List<Map<String, Object?>> list) {
}

/// Utility to encode a blob to allow blob query using
/// 'hex(blob_field) = ?', Sqlite.hex([1,2,3])
/// `'hex(blob_field) = ?', Sqlite.hex([1,2,3])`
String hex(List<int> bytes) {
final buffer = StringBuffer();
for (var part in bytes) {
Expand Down
2 changes: 1 addition & 1 deletion sqflite_common/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: sqflite_common
homepage: https://github.com/tekartik/sqflite/tree/master/sqflite_common
description: Dart wrapper on SQLite, a self-contained, high-reliability, embedded, SQL database engine.
version: 2.5.4+5
version: 2.5.4+6
funding:
- https://github.com/sponsors/alextekartik

Expand Down

0 comments on commit dd468e9

Please sign in to comment.