Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
spelling: greater [api]
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
  • Loading branch information
jsoref committed Sep 11, 2024
1 parent cc9ad1a commit 0c8ca9e
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
12 changes: 12 additions & 0 deletions lib/datastore.dart
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,20 @@ class FilterRelation {
// ignore: constant_identifier_names
static const FilterRelation LessThanOrEqual = FilterRelation._('<=');
// ignore: constant_identifier_names
static const FilterRelation GreaterThan = FilterRelation._('>');

/// Old misspelled name for [GreaterThan], retained for compatibility.
///
/// @nodoc
@Deprecated('Use FilterRelation.GreaterThan instead')
static const FilterRelation GreatherThan = FilterRelation._('>');
// ignore: constant_identifier_names
static const FilterRelation GreaterThanOrEqual = FilterRelation._('>=');

/// Old misspelled name for [GreaterThanOrEqual], retained for compatibility.
///
/// @nodoc
@Deprecated('Use FilterRelation.GreaterThanOrEqual instead')
static const FilterRelation GreatherThanOrEqual = FilterRelation._('>=');
// ignore: constant_identifier_names
static const FilterRelation Equal = FilterRelation._('==');
Expand Down
18 changes: 18 additions & 0 deletions lib/fix_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,21 @@ transforms:
changes:
- kind: 'rename'
newName: 'Descending'
- title: 'Rename to GreaterThan'
date: 2024-09-11
element:
uris: ['datastore.dart']
field: 'GreatherThan'
inClass: 'FilterRelation'
changes:
- kind: 'rename'
newName: 'GreaterThan'
- title: 'Rename to GreaterThanOrEqual'
date: 2024-09-11
element:
uris: ['datastore.dart']
field: 'GreatherThanOrEqual'
inClass: 'FilterRelation'
changes:
- kind: 'rename'
newName: 'GreaterThanOrEqual'
4 changes: 2 additions & 2 deletions lib/src/datastore_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ class DatastoreImpl implements datastore.Datastore {
datastore.FilterRelation.LessThan: 'LESS_THAN',
datastore.FilterRelation.LessThanOrEqual: 'LESS_THAN_OR_EQUAL',
datastore.FilterRelation.Equal: 'EQUAL',
datastore.FilterRelation.GreatherThan: 'GREATER_THAN',
datastore.FilterRelation.GreatherThanOrEqual: 'GREATER_THAN_OR_EQUAL',
datastore.FilterRelation.GreaterThan: 'GREATER_THAN',
datastore.FilterRelation.GreaterThanOrEqual: 'GREATER_THAN_OR_EQUAL',
};

api.Filter _convertDatastore2ApiFilter(datastore.Filter filter) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/db/db.dart
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ class Query<T extends Model> {
final _relationMapping = const <String, ds.FilterRelation>{
'<': ds.FilterRelation.LessThan,
'<=': ds.FilterRelation.LessThanOrEqual,
'>': ds.FilterRelation.GreatherThan,
'>=': ds.FilterRelation.GreatherThanOrEqual,
'>': ds.FilterRelation.GreaterThan,
'>=': ds.FilterRelation.GreaterThanOrEqual,
'=': ds.FilterRelation.Equal,
};

Expand Down
2 changes: 1 addition & 1 deletion test/datastore/e2e/datastore_test_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ void runTests(Datastore datastore, String? namespace) {
assert(indexedEntity.length == 1);

var filters = [
Filter(FilterRelation.GreatherThan, queryKey, queryLowerBound),
Filter(FilterRelation.GreaterThan, queryKey, queryLowerBound),
Filter(FilterRelation.LessThan, queryKey, queryUpperbound),
];
var listFilters = [
Expand Down

0 comments on commit 0c8ca9e

Please sign in to comment.