mirror of https://github.com/AMT-Cheif/drift.git
Deprecate top-level members in moor package
This commit is contained in:
parent
7d41e42c78
commit
6b030036d4
|
@ -9,7 +9,7 @@ path: /name
|
|||
|
||||
Moor has been renamed to `drift`. The reason for this is that, in some parts of the world, moor may be used as a derogatery term.
|
||||
I have not been aware of this when starting this project, but we believe that the current name does not reflect the inclusivity of the Dart and Flutter communities.
|
||||
Despite the associated effort, renaming the project is the right decision.
|
||||
Despite the associated effort, I'm convinced that renaming the project is the right decision.
|
||||
Thank you for your understanding!
|
||||
|
||||
Until version `5.0.0`, the current `moor` and `moor_generator` packages will continue to work - __no urgent action is necessary__.
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
/// Utility classes to implement custom database backends that work together
|
||||
/// with moor.
|
||||
@moorDeprecated
|
||||
library backends;
|
||||
|
||||
import 'package:moor/src/deprecated.dart';
|
||||
|
||||
export 'package:drift/backends.dart';
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
/// [moor_ffi](https://moor.simonbinder.eu/docs/other-engines/vm/) and it might
|
||||
/// not work on older iOS versions.
|
||||
@experimental
|
||||
@moorDeprecated
|
||||
library json1;
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:moor/src/deprecated.dart';
|
||||
|
||||
export 'package:drift/extensions/json1.dart';
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
/// High-level bindings to mathematical functions that are only available in
|
||||
/// `moor_ffi`.
|
||||
@moorDeprecated
|
||||
library moor_ffi_functions;
|
||||
|
||||
import 'package:moor/src/deprecated.dart';
|
||||
|
||||
export 'package:drift/extensions/native.dart';
|
||||
|
|
|
@ -5,9 +5,11 @@
|
|||
/// `sqlite3_flutter_libs` package to ship the latest sqlite3 version with your
|
||||
/// app.
|
||||
/// For more information other platforms, see [other engines](https://moor.simonbinder.eu/docs/other-engines/vm/).
|
||||
@moorDeprecated
|
||||
library moor.ffi;
|
||||
|
||||
import 'package:drift/native.dart';
|
||||
import 'package:moor/src/deprecated.dart';
|
||||
|
||||
export 'package:drift/native.dart' hide NativeDatabase;
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
/// Contains utils to run moor databases in a background isolate. This API is
|
||||
/// not supported on the web.
|
||||
@moorDeprecated
|
||||
library isolate;
|
||||
|
||||
import 'package:drift/isolate.dart';
|
||||
import 'package:moor/src/deprecated.dart';
|
||||
|
||||
export 'package:drift/isolate.dart';
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
@moorDeprecated
|
||||
library moor;
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
import 'src/deprecated.dart';
|
||||
|
||||
export 'package:drift/drift.dart'
|
||||
hide
|
||||
DriftRuntimeOptions,
|
||||
|
@ -26,6 +29,7 @@ export 'package:drift/drift.dart'
|
|||
/// }
|
||||
/// ```
|
||||
@pragma('moor2drift', 'DriftDatabase')
|
||||
@moorDeprecated
|
||||
typedef UseMoor = DriftDatabase;
|
||||
|
||||
/// Annotation to use on classes that implement [DatabaseAccessor]. It specifies
|
||||
|
@ -52,6 +56,7 @@ typedef UseMoor = DriftDatabase;
|
|||
/// See also:
|
||||
/// - https://moor.simonbinder.eu/daos/
|
||||
@pragma('moor2drift', 'DriftAccessor')
|
||||
@moorDeprecated
|
||||
typedef UseDao = DriftAccessor;
|
||||
|
||||
/// A wrapper class for internal exceptions thrown by the underlying database
|
||||
|
@ -60,11 +65,13 @@ typedef UseDao = DriftAccessor;
|
|||
/// For instance, when we know that an invalid statement has been constructed,
|
||||
/// we catch the database exception and try to explain why that has happened.
|
||||
@pragma('moor2drift', 'DriftWrappedException')
|
||||
@moorDeprecated
|
||||
typedef MoorWrappedException = DriftWrappedException;
|
||||
|
||||
/// Defines additional runtime behavior for moor. Changing the fields of this
|
||||
/// class is rarely necessary.
|
||||
@pragma('moor2drift', 'DriftRuntimeOptions')
|
||||
@moorDeprecated
|
||||
typedef MoorRuntimeOptions = DriftRuntimeOptions;
|
||||
|
||||
/// Stores the [MoorRuntimeOptions] describing global moor behavior across
|
||||
|
@ -72,9 +79,11 @@ typedef MoorRuntimeOptions = DriftRuntimeOptions;
|
|||
///
|
||||
/// Note that is is adapting this behavior is rarely needed.
|
||||
@pragma('moor2drift', 'driftRuntimeOptions')
|
||||
@moorDeprecated
|
||||
MoorRuntimeOptions get moorRuntimeOptions => driftRuntimeOptions;
|
||||
|
||||
@pragma('moor2drift', 'driftRuntimeOptions')
|
||||
@moorDeprecated
|
||||
set moorRuntimeOptions(MoorRuntimeOptions o) => driftRuntimeOptions = o;
|
||||
|
||||
/// For use by generated code in calculating hash codes. Do not use directly.
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
/// web version of moor. See [the documentation](https://moor.simonbinder.eu/web)
|
||||
/// for a more detailed instruction.
|
||||
@experimental
|
||||
@moorDeprecated
|
||||
library moor_web;
|
||||
|
||||
import 'package:drift/web.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:moor/src/deprecated.dart';
|
||||
|
||||
export 'package:drift/web.dart' hide DriftWebStorage;
|
||||
|
||||
|
|
|
@ -48,10 +48,12 @@
|
|||
/// contains another implementation based on web workers that might be of
|
||||
/// interest.
|
||||
@experimental
|
||||
@moorDeprecated
|
||||
library remote;
|
||||
|
||||
import 'package:drift/remote.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:moor/src/deprecated.dart';
|
||||
import 'package:stream_channel/stream_channel.dart';
|
||||
|
||||
export 'package:drift/remote.dart' hide DriftServer;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
/// Provides utilities around sql keywords, like optional escaping etc.
|
||||
@moorDeprecated
|
||||
library moor.sqlite_keywords;
|
||||
|
||||
import 'package:moor/src/deprecated.dart';
|
||||
|
||||
export 'package:drift/sqlite_keywords.dart';
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
/// Deprecation hint as a constant.
|
||||
const moorDeprecated = Deprecated(
|
||||
'Moor has been renamed to drift. See https://drift.simonbinder.eu/name for '
|
||||
'more information and how to migrate in minutes.',
|
||||
);
|
Loading…
Reference in New Issue