mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
update generated files
This commit is contained in:
parent
5712fab88f
commit
a0df73551e
24 changed files with 6977 additions and 134 deletions
|
@ -2,6 +2,8 @@ import 'package:isar/isar.dart';
|
|||
import 'package:stackwallet/models/isar/models/blockchain_data/output.dart';
|
||||
import 'package:stackwallet/models/isar/models/blockchain_data/transaction.dart';
|
||||
|
||||
part 'input.g.dart';
|
||||
|
||||
@Collection()
|
||||
class Input {
|
||||
Id id = Isar.autoIncrement;
|
||||
|
|
1347
lib/models/isar/models/blockchain_data/input.g.dart
Normal file
1347
lib/models/isar/models/blockchain_data/input.g.dart
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,8 @@
|
|||
import 'package:isar/isar.dart';
|
||||
import 'package:stackwallet/models/isar/models/blockchain_data/transaction.dart';
|
||||
|
||||
part 'output.g.dart';
|
||||
|
||||
@Collection()
|
||||
class Output {
|
||||
Id id = Isar.autoIncrement;
|
||||
|
|
1152
lib/models/isar/models/blockchain_data/output.g.dart
Normal file
1152
lib/models/isar/models/blockchain_data/output.g.dart
Normal file
File diff suppressed because it is too large
Load diff
|
@ -3,6 +3,8 @@ import 'package:stackwallet/models/isar/models/blockchain_data/input.dart';
|
|||
import 'package:stackwallet/models/isar/models/blockchain_data/output.dart';
|
||||
import 'package:stackwallet/models/isar/models/transaction_note.dart';
|
||||
|
||||
part 'transaction.g.dart';
|
||||
|
||||
@Collection()
|
||||
class Transaction {
|
||||
Id id = Isar.autoIncrement;
|
||||
|
@ -15,8 +17,10 @@ class Transaction {
|
|||
|
||||
late int timestamp;
|
||||
|
||||
@enumerated
|
||||
late TransactionType txType;
|
||||
|
||||
@enumerated
|
||||
late TransactionSubType subType;
|
||||
|
||||
late int amount;
|
||||
|
@ -47,25 +51,21 @@ class Transaction {
|
|||
|
||||
// Used in Isar db and stored there as int indexes so adding/removing values
|
||||
// in this definition should be done extremely carefully in production
|
||||
enum TransactionType with IsarEnum<int> {
|
||||
enum TransactionType {
|
||||
// TODO: add more types before prod release?
|
||||
outgoing,
|
||||
incoming,
|
||||
sendToSelf, // should we keep this?
|
||||
anonymize; // firo specific
|
||||
|
||||
@override
|
||||
int get value => index;
|
||||
}
|
||||
|
||||
// Used in Isar db and stored there as int indexes so adding/removing values
|
||||
// in this definition should be done extremely carefully in production
|
||||
enum TransactionSubType with IsarEnum<int> {
|
||||
enum TransactionSubType {
|
||||
// TODO: add more types before prod release?
|
||||
none,
|
||||
bip47Notification, // bip47 payment code notification transaction flag
|
||||
mint; // firo specific
|
||||
|
||||
@override
|
||||
int get value => index;
|
||||
}
|
||||
|
|
2213
lib/models/isar/models/blockchain_data/transaction.g.dart
Normal file
2213
lib/models/isar/models/blockchain_data/transaction.g.dart
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,7 @@
|
|||
import 'package:isar/isar.dart';
|
||||
|
||||
part 'utxo.g.dart';
|
||||
|
||||
@Collection()
|
||||
class UTXO {
|
||||
Id id = Isar.autoIncrement;
|
||||
|
@ -23,8 +25,6 @@ class UTXO {
|
|||
|
||||
@Embedded()
|
||||
class Status {
|
||||
Id id = Isar.autoIncrement;
|
||||
|
||||
late bool confirmed;
|
||||
|
||||
late int confirmations;
|
||||
|
|
1520
lib/models/isar/models/blockchain_data/utxo.g.dart
Normal file
1520
lib/models/isar/models/blockchain_data/utxo.g.dart
Normal file
File diff suppressed because it is too large
Load diff
|
@ -7,7 +7,7 @@ part of 'encrypted_string_value.dart';
|
|||
// **************************************************************************
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, join_return_with_assignment, avoid_js_rounded_ints, prefer_final_locals
|
||||
// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
|
||||
|
||||
extension GetEncryptedStringValueCollection on Isar {
|
||||
IsarCollection<EncryptedStringValue> get encryptedStringValues =>
|
||||
|
@ -30,12 +30,9 @@ const EncryptedStringValueSchema = CollectionSchema(
|
|||
)
|
||||
},
|
||||
estimateSize: _encryptedStringValueEstimateSize,
|
||||
serializeNative: _encryptedStringValueSerializeNative,
|
||||
deserializeNative: _encryptedStringValueDeserializeNative,
|
||||
deserializePropNative: _encryptedStringValueDeserializePropNative,
|
||||
serializeWeb: _encryptedStringValueSerializeWeb,
|
||||
deserializeWeb: _encryptedStringValueDeserializeWeb,
|
||||
deserializePropWeb: _encryptedStringValueDeserializePropWeb,
|
||||
serialize: _encryptedStringValueSerialize,
|
||||
deserialize: _encryptedStringValueDeserialize,
|
||||
deserializeProp: _encryptedStringValueDeserializeProp,
|
||||
idName: r'id',
|
||||
indexes: {
|
||||
r'key': IndexSchema(
|
||||
|
@ -57,7 +54,7 @@ const EncryptedStringValueSchema = CollectionSchema(
|
|||
getId: _encryptedStringValueGetId,
|
||||
getLinks: _encryptedStringValueGetLinks,
|
||||
attach: _encryptedStringValueAttach,
|
||||
version: 5,
|
||||
version: '3.0.5',
|
||||
);
|
||||
|
||||
int _encryptedStringValueEstimateSize(
|
||||
|
@ -71,20 +68,19 @@ int _encryptedStringValueEstimateSize(
|
|||
return bytesCount;
|
||||
}
|
||||
|
||||
int _encryptedStringValueSerializeNative(
|
||||
void _encryptedStringValueSerialize(
|
||||
EncryptedStringValue object,
|
||||
IsarBinaryWriter writer,
|
||||
IsarWriter writer,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
writer.writeString(offsets[0], object.key);
|
||||
writer.writeString(offsets[1], object.value);
|
||||
return writer.usedBytes;
|
||||
}
|
||||
|
||||
EncryptedStringValue _encryptedStringValueDeserializeNative(
|
||||
int id,
|
||||
IsarBinaryReader reader,
|
||||
EncryptedStringValue _encryptedStringValueDeserialize(
|
||||
Id id,
|
||||
IsarReader reader,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
|
@ -95,9 +91,8 @@ EncryptedStringValue _encryptedStringValueDeserializeNative(
|
|||
return object;
|
||||
}
|
||||
|
||||
P _encryptedStringValueDeserializePropNative<P>(
|
||||
Id id,
|
||||
IsarBinaryReader reader,
|
||||
P _encryptedStringValueDeserializeProp<P>(
|
||||
IsarReader reader,
|
||||
int propertyId,
|
||||
int offset,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
|
@ -112,33 +107,8 @@ P _encryptedStringValueDeserializePropNative<P>(
|
|||
}
|
||||
}
|
||||
|
||||
Object _encryptedStringValueSerializeWeb(
|
||||
IsarCollection<EncryptedStringValue> collection,
|
||||
EncryptedStringValue object) {
|
||||
/*final jsObj = IsarNative.newJsObject();*/ throw UnimplementedError();
|
||||
}
|
||||
|
||||
EncryptedStringValue _encryptedStringValueDeserializeWeb(
|
||||
IsarCollection<EncryptedStringValue> collection, Object jsObj) {
|
||||
/*final object = EncryptedStringValue();object.id = IsarNative.jsObjectGet(jsObj, r'id') ?? (double.negativeInfinity as int);object.key = IsarNative.jsObjectGet(jsObj, r'key') ?? '';object.value = IsarNative.jsObjectGet(jsObj, r'value') ?? '';*/
|
||||
//return object;
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
P _encryptedStringValueDeserializePropWeb<P>(
|
||||
Object jsObj, String propertyName) {
|
||||
switch (propertyName) {
|
||||
default:
|
||||
throw IsarError('Illegal propertyName');
|
||||
}
|
||||
}
|
||||
|
||||
int? _encryptedStringValueGetId(EncryptedStringValue object) {
|
||||
if (object.id == Isar.autoIncrement) {
|
||||
return null;
|
||||
} else {
|
||||
return object.id;
|
||||
}
|
||||
Id _encryptedStringValueGetId(EncryptedStringValue object) {
|
||||
return object.id;
|
||||
}
|
||||
|
||||
List<IsarLinkBase<dynamic>> _encryptedStringValueGetLinks(
|
||||
|
@ -188,19 +158,19 @@ extension EncryptedStringValueByIndex on IsarCollection<EncryptedStringValue> {
|
|||
return deleteAllByIndexSync(r'key', values);
|
||||
}
|
||||
|
||||
Future<int> putByKey(EncryptedStringValue object) {
|
||||
Future<Id> putByKey(EncryptedStringValue object) {
|
||||
return putByIndex(r'key', object);
|
||||
}
|
||||
|
||||
int putByKeySync(EncryptedStringValue object, {bool saveLinks = true}) {
|
||||
Id putByKeySync(EncryptedStringValue object, {bool saveLinks = true}) {
|
||||
return putByIndexSync(r'key', object, saveLinks: saveLinks);
|
||||
}
|
||||
|
||||
Future<List<int>> putAllByKey(List<EncryptedStringValue> objects) {
|
||||
Future<List<Id>> putAllByKey(List<EncryptedStringValue> objects) {
|
||||
return putAllByIndex(r'key', objects);
|
||||
}
|
||||
|
||||
List<int> putAllByKeySync(List<EncryptedStringValue> objects,
|
||||
List<Id> putAllByKeySync(List<EncryptedStringValue> objects,
|
||||
{bool saveLinks = true}) {
|
||||
return putAllByIndexSync(r'key', objects, saveLinks: saveLinks);
|
||||
}
|
||||
|
@ -219,7 +189,7 @@ extension EncryptedStringValueQueryWhereSort
|
|||
extension EncryptedStringValueQueryWhere
|
||||
on QueryBuilder<EncryptedStringValue, EncryptedStringValue, QWhereClause> {
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue, QAfterWhereClause>
|
||||
idEqualTo(int id) {
|
||||
idEqualTo(Id id) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IdWhereClause.between(
|
||||
lower: id,
|
||||
|
@ -229,7 +199,7 @@ extension EncryptedStringValueQueryWhere
|
|||
}
|
||||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue, QAfterWhereClause>
|
||||
idNotEqualTo(int id) {
|
||||
idNotEqualTo(Id id) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
if (query.whereSort == Sort.asc) {
|
||||
return query
|
||||
|
@ -252,7 +222,7 @@ extension EncryptedStringValueQueryWhere
|
|||
}
|
||||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue, QAfterWhereClause>
|
||||
idGreaterThan(int id, {bool include = false}) {
|
||||
idGreaterThan(Id id, {bool include = false}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(
|
||||
IdWhereClause.greaterThan(lower: id, includeLower: include),
|
||||
|
@ -261,7 +231,7 @@ extension EncryptedStringValueQueryWhere
|
|||
}
|
||||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue, QAfterWhereClause>
|
||||
idLessThan(int id, {bool include = false}) {
|
||||
idLessThan(Id id, {bool include = false}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(
|
||||
IdWhereClause.lessThan(upper: id, includeUpper: include),
|
||||
|
@ -271,8 +241,8 @@ extension EncryptedStringValueQueryWhere
|
|||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue, QAfterWhereClause>
|
||||
idBetween(
|
||||
int lowerId,
|
||||
int upperId, {
|
||||
Id lowerId,
|
||||
Id upperId, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
|
@ -335,7 +305,7 @@ extension EncryptedStringValueQueryWhere
|
|||
extension EncryptedStringValueQueryFilter on QueryBuilder<EncryptedStringValue,
|
||||
EncryptedStringValue, QFilterCondition> {
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue,
|
||||
QAfterFilterCondition> idEqualTo(int value) {
|
||||
QAfterFilterCondition> idEqualTo(Id value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'id',
|
||||
|
@ -346,7 +316,7 @@ extension EncryptedStringValueQueryFilter on QueryBuilder<EncryptedStringValue,
|
|||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue,
|
||||
QAfterFilterCondition> idGreaterThan(
|
||||
int value, {
|
||||
Id value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
|
@ -360,7 +330,7 @@ extension EncryptedStringValueQueryFilter on QueryBuilder<EncryptedStringValue,
|
|||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue,
|
||||
QAfterFilterCondition> idLessThan(
|
||||
int value, {
|
||||
Id value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
|
@ -374,8 +344,8 @@ extension EncryptedStringValueQueryFilter on QueryBuilder<EncryptedStringValue,
|
|||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue,
|
||||
QAfterFilterCondition> idBetween(
|
||||
int lower,
|
||||
int upper, {
|
||||
Id lower,
|
||||
Id upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
|
@ -508,6 +478,26 @@ extension EncryptedStringValueQueryFilter on QueryBuilder<EncryptedStringValue,
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue,
|
||||
QAfterFilterCondition> keyIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'key',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue,
|
||||
QAfterFilterCondition> keyIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
property: r'key',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue,
|
||||
QAfterFilterCondition> valueEqualTo(
|
||||
String value, {
|
||||
|
@ -625,6 +615,26 @@ extension EncryptedStringValueQueryFilter on QueryBuilder<EncryptedStringValue,
|
|||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue,
|
||||
QAfterFilterCondition> valueIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'value',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<EncryptedStringValue, EncryptedStringValue,
|
||||
QAfterFilterCondition> valueIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
property: r'value',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension EncryptedStringValueQueryObject on QueryBuilder<EncryptedStringValue,
|
||||
|
|
|
@ -13,6 +13,8 @@ class Log {
|
|||
@Index()
|
||||
late int timestampInMillisUTC;
|
||||
|
||||
// ignore: undefined_name
|
||||
@Enumerated(EnumType.name)
|
||||
late LogLevel logLevel;
|
||||
|
||||
@override
|
||||
|
|
|
@ -7,7 +7,7 @@ part of 'log.dart';
|
|||
// **************************************************************************
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, join_return_with_assignment, avoid_js_rounded_ints, prefer_final_locals
|
||||
// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
|
||||
|
||||
extension GetLogCollection on Isar {
|
||||
IsarCollection<Log> get logs => this.collection();
|
||||
|
@ -21,6 +21,7 @@ const LogSchema = CollectionSchema(
|
|||
id: 0,
|
||||
name: r'logLevel',
|
||||
type: IsarType.string,
|
||||
enumMap: _LoglogLevelEnumValueMap,
|
||||
),
|
||||
r'message': PropertySchema(
|
||||
id: 1,
|
||||
|
@ -34,12 +35,9 @@ const LogSchema = CollectionSchema(
|
|||
)
|
||||
},
|
||||
estimateSize: _logEstimateSize,
|
||||
serializeNative: _logSerializeNative,
|
||||
deserializeNative: _logDeserializeNative,
|
||||
deserializePropNative: _logDeserializePropNative,
|
||||
serializeWeb: _logSerializeWeb,
|
||||
deserializeWeb: _logDeserializeWeb,
|
||||
deserializePropWeb: _logDeserializePropWeb,
|
||||
serialize: _logSerialize,
|
||||
deserialize: _logDeserialize,
|
||||
deserializeProp: _logDeserializeProp,
|
||||
idName: r'id',
|
||||
indexes: {
|
||||
r'timestampInMillisUTC': IndexSchema(
|
||||
|
@ -61,7 +59,7 @@ const LogSchema = CollectionSchema(
|
|||
getId: _logGetId,
|
||||
getLinks: _logGetLinks,
|
||||
attach: _logAttach,
|
||||
version: 5,
|
||||
version: '3.0.5',
|
||||
);
|
||||
|
||||
int _logEstimateSize(
|
||||
|
@ -70,49 +68,48 @@ int _logEstimateSize(
|
|||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
var bytesCount = offsets.last;
|
||||
bytesCount += 3 + object.logLevel.value.length * 3;
|
||||
bytesCount += 3 + object.logLevel.name.length * 3;
|
||||
bytesCount += 3 + object.message.length * 3;
|
||||
return bytesCount;
|
||||
}
|
||||
|
||||
int _logSerializeNative(
|
||||
void _logSerialize(
|
||||
Log object,
|
||||
IsarBinaryWriter writer,
|
||||
IsarWriter writer,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
writer.writeString(offsets[0], object.logLevel.value);
|
||||
writer.writeString(offsets[0], object.logLevel.name);
|
||||
writer.writeString(offsets[1], object.message);
|
||||
writer.writeLong(offsets[2], object.timestampInMillisUTC);
|
||||
return writer.usedBytes;
|
||||
}
|
||||
|
||||
Log _logDeserializeNative(
|
||||
int id,
|
||||
IsarBinaryReader reader,
|
||||
Log _logDeserialize(
|
||||
Id id,
|
||||
IsarReader reader,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
final object = Log();
|
||||
object.id = id;
|
||||
object.logLevel =
|
||||
_LogLogLevelMap[reader.readStringOrNull(offsets[0])] ?? LogLevel.Info;
|
||||
_LoglogLevelValueEnumMap[reader.readStringOrNull(offsets[0])] ??
|
||||
LogLevel.Info;
|
||||
object.message = reader.readString(offsets[1]);
|
||||
object.timestampInMillisUTC = reader.readLong(offsets[2]);
|
||||
return object;
|
||||
}
|
||||
|
||||
P _logDeserializePropNative<P>(
|
||||
Id id,
|
||||
IsarBinaryReader reader,
|
||||
P _logDeserializeProp<P>(
|
||||
IsarReader reader,
|
||||
int propertyId,
|
||||
int offset,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
switch (propertyId) {
|
||||
case 0:
|
||||
return (_LogLogLevelMap[reader.readStringOrNull(offset)] ?? LogLevel.Info)
|
||||
as P;
|
||||
return (_LoglogLevelValueEnumMap[reader.readStringOrNull(offset)] ??
|
||||
LogLevel.Info) as P;
|
||||
case 1:
|
||||
return (reader.readString(offset)) as P;
|
||||
case 2:
|
||||
|
@ -122,36 +119,21 @@ P _logDeserializePropNative<P>(
|
|||
}
|
||||
}
|
||||
|
||||
Object _logSerializeWeb(IsarCollection<Log> collection, Log object) {
|
||||
/*final jsObj = IsarNative.newJsObject();*/ throw UnimplementedError();
|
||||
}
|
||||
|
||||
Log _logDeserializeWeb(IsarCollection<Log> collection, Object jsObj) {
|
||||
/*final object = Log();object.id = IsarNative.jsObjectGet(jsObj, r'id') ?? (double.negativeInfinity as int);object.logLevel = IsarNative.jsObjectGet(jsObj, r'logLevel') ?? LogLevel.Info;object.message = IsarNative.jsObjectGet(jsObj, r'message') ?? '';object.timestampInMillisUTC = IsarNative.jsObjectGet(jsObj, r'timestampInMillisUTC') ?? (double.negativeInfinity as int);*/
|
||||
//return object;
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
P _logDeserializePropWeb<P>(Object jsObj, String propertyName) {
|
||||
switch (propertyName) {
|
||||
default:
|
||||
throw IsarError('Illegal propertyName');
|
||||
}
|
||||
}
|
||||
|
||||
final _LogLogLevelMap = {
|
||||
LogLevel.Info.value: LogLevel.Info,
|
||||
LogLevel.Warning.value: LogLevel.Warning,
|
||||
LogLevel.Error.value: LogLevel.Error,
|
||||
LogLevel.Fatal.value: LogLevel.Fatal,
|
||||
const _LoglogLevelEnumValueMap = {
|
||||
r'Info': r'Info',
|
||||
r'Warning': r'Warning',
|
||||
r'Error': r'Error',
|
||||
r'Fatal': r'Fatal',
|
||||
};
|
||||
const _LoglogLevelValueEnumMap = {
|
||||
r'Info': LogLevel.Info,
|
||||
r'Warning': LogLevel.Warning,
|
||||
r'Error': LogLevel.Error,
|
||||
r'Fatal': LogLevel.Fatal,
|
||||
};
|
||||
|
||||
int? _logGetId(Log object) {
|
||||
if (object.id == Isar.autoIncrement) {
|
||||
return null;
|
||||
} else {
|
||||
return object.id;
|
||||
}
|
||||
Id _logGetId(Log object) {
|
||||
return object.id;
|
||||
}
|
||||
|
||||
List<IsarLinkBase<dynamic>> _logGetLinks(Log object) {
|
||||
|
@ -179,7 +161,7 @@ extension LogQueryWhereSort on QueryBuilder<Log, Log, QWhere> {
|
|||
}
|
||||
|
||||
extension LogQueryWhere on QueryBuilder<Log, Log, QWhereClause> {
|
||||
QueryBuilder<Log, Log, QAfterWhereClause> idEqualTo(int id) {
|
||||
QueryBuilder<Log, Log, QAfterWhereClause> idEqualTo(Id id) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IdWhereClause.between(
|
||||
lower: id,
|
||||
|
@ -188,7 +170,7 @@ extension LogQueryWhere on QueryBuilder<Log, Log, QWhereClause> {
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterWhereClause> idNotEqualTo(int id) {
|
||||
QueryBuilder<Log, Log, QAfterWhereClause> idNotEqualTo(Id id) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
if (query.whereSort == Sort.asc) {
|
||||
return query
|
||||
|
@ -210,7 +192,7 @@ extension LogQueryWhere on QueryBuilder<Log, Log, QWhereClause> {
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterWhereClause> idGreaterThan(int id,
|
||||
QueryBuilder<Log, Log, QAfterWhereClause> idGreaterThan(Id id,
|
||||
{bool include = false}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(
|
||||
|
@ -219,7 +201,7 @@ extension LogQueryWhere on QueryBuilder<Log, Log, QWhereClause> {
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterWhereClause> idLessThan(int id,
|
||||
QueryBuilder<Log, Log, QAfterWhereClause> idLessThan(Id id,
|
||||
{bool include = false}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(
|
||||
|
@ -229,8 +211,8 @@ extension LogQueryWhere on QueryBuilder<Log, Log, QWhereClause> {
|
|||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterWhereClause> idBetween(
|
||||
int lowerId,
|
||||
int upperId, {
|
||||
Id lowerId,
|
||||
Id upperId, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
|
@ -336,7 +318,7 @@ extension LogQueryWhere on QueryBuilder<Log, Log, QWhereClause> {
|
|||
}
|
||||
|
||||
extension LogQueryFilter on QueryBuilder<Log, Log, QFilterCondition> {
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> idEqualTo(int value) {
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> idEqualTo(Id value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'id',
|
||||
|
@ -346,7 +328,7 @@ extension LogQueryFilter on QueryBuilder<Log, Log, QFilterCondition> {
|
|||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> idGreaterThan(
|
||||
int value, {
|
||||
Id value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
|
@ -359,7 +341,7 @@ extension LogQueryFilter on QueryBuilder<Log, Log, QFilterCondition> {
|
|||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> idLessThan(
|
||||
int value, {
|
||||
Id value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
|
@ -372,8 +354,8 @@ extension LogQueryFilter on QueryBuilder<Log, Log, QFilterCondition> {
|
|||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> idBetween(
|
||||
int lower,
|
||||
int upper, {
|
||||
Id lower,
|
||||
Id upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
|
@ -498,6 +480,24 @@ extension LogQueryFilter on QueryBuilder<Log, Log, QFilterCondition> {
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> logLevelIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'logLevel',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> logLevelIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
property: r'logLevel',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> messageEqualTo(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
|
@ -608,6 +608,24 @@ extension LogQueryFilter on QueryBuilder<Log, Log, QFilterCondition> {
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> messageIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'message',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> messageIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
property: r'message',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Log, Log, QAfterFilterCondition> timestampInMillisUTCEqualTo(
|
||||
int value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import 'package:isar/isar.dart';
|
||||
import 'package:stackwallet/models/isar/models/blockchain_data/transaction.dart';
|
||||
|
||||
part 'transaction_note.g.dart';
|
||||
|
||||
@Collection()
|
||||
class TransactionNote {
|
||||
Id id = Isar.autoIncrement;
|
||||
|
|
470
lib/models/isar/models/transaction_note.g.dart
Normal file
470
lib/models/isar/models/transaction_note.g.dart
Normal file
|
@ -0,0 +1,470 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'transaction_note.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// IsarCollectionGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
|
||||
|
||||
extension GetTransactionNoteCollection on Isar {
|
||||
IsarCollection<TransactionNote> get transactionNotes => this.collection();
|
||||
}
|
||||
|
||||
const TransactionNoteSchema = CollectionSchema(
|
||||
name: r'TransactionNote',
|
||||
id: 5128348263878806765,
|
||||
properties: {
|
||||
r'value': PropertySchema(
|
||||
id: 0,
|
||||
name: r'value',
|
||||
type: IsarType.string,
|
||||
)
|
||||
},
|
||||
estimateSize: _transactionNoteEstimateSize,
|
||||
serialize: _transactionNoteSerialize,
|
||||
deserialize: _transactionNoteDeserialize,
|
||||
deserializeProp: _transactionNoteDeserializeProp,
|
||||
idName: r'id',
|
||||
indexes: {},
|
||||
links: {
|
||||
r'transaction': LinkSchema(
|
||||
id: -3227504867737807188,
|
||||
name: r'transaction',
|
||||
target: r'Transaction',
|
||||
single: true,
|
||||
linkName: r'note',
|
||||
)
|
||||
},
|
||||
embeddedSchemas: {},
|
||||
getId: _transactionNoteGetId,
|
||||
getLinks: _transactionNoteGetLinks,
|
||||
attach: _transactionNoteAttach,
|
||||
version: '3.0.5',
|
||||
);
|
||||
|
||||
int _transactionNoteEstimateSize(
|
||||
TransactionNote object,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
var bytesCount = offsets.last;
|
||||
bytesCount += 3 + object.value.length * 3;
|
||||
return bytesCount;
|
||||
}
|
||||
|
||||
void _transactionNoteSerialize(
|
||||
TransactionNote object,
|
||||
IsarWriter writer,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
writer.writeString(offsets[0], object.value);
|
||||
}
|
||||
|
||||
TransactionNote _transactionNoteDeserialize(
|
||||
Id id,
|
||||
IsarReader reader,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
final object = TransactionNote();
|
||||
object.id = id;
|
||||
object.value = reader.readString(offsets[0]);
|
||||
return object;
|
||||
}
|
||||
|
||||
P _transactionNoteDeserializeProp<P>(
|
||||
IsarReader reader,
|
||||
int propertyId,
|
||||
int offset,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
switch (propertyId) {
|
||||
case 0:
|
||||
return (reader.readString(offset)) as P;
|
||||
default:
|
||||
throw IsarError('Unknown property with id $propertyId');
|
||||
}
|
||||
}
|
||||
|
||||
Id _transactionNoteGetId(TransactionNote object) {
|
||||
return object.id;
|
||||
}
|
||||
|
||||
List<IsarLinkBase<dynamic>> _transactionNoteGetLinks(TransactionNote object) {
|
||||
return [object.transaction];
|
||||
}
|
||||
|
||||
void _transactionNoteAttach(
|
||||
IsarCollection<dynamic> col, Id id, TransactionNote object) {
|
||||
object.id = id;
|
||||
object.transaction
|
||||
.attach(col, col.isar.collection<Transaction>(), r'transaction', id);
|
||||
}
|
||||
|
||||
extension TransactionNoteQueryWhereSort
|
||||
on QueryBuilder<TransactionNote, TransactionNote, QWhere> {
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterWhere> anyId() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(const IdWhereClause.any());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TransactionNoteQueryWhere
|
||||
on QueryBuilder<TransactionNote, TransactionNote, QWhereClause> {
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterWhereClause> idEqualTo(
|
||||
Id id) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IdWhereClause.between(
|
||||
lower: id,
|
||||
upper: id,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterWhereClause>
|
||||
idNotEqualTo(Id id) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
if (query.whereSort == Sort.asc) {
|
||||
return query
|
||||
.addWhereClause(
|
||||
IdWhereClause.lessThan(upper: id, includeUpper: false),
|
||||
)
|
||||
.addWhereClause(
|
||||
IdWhereClause.greaterThan(lower: id, includeLower: false),
|
||||
);
|
||||
} else {
|
||||
return query
|
||||
.addWhereClause(
|
||||
IdWhereClause.greaterThan(lower: id, includeLower: false),
|
||||
)
|
||||
.addWhereClause(
|
||||
IdWhereClause.lessThan(upper: id, includeUpper: false),
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterWhereClause>
|
||||
idGreaterThan(Id id, {bool include = false}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(
|
||||
IdWhereClause.greaterThan(lower: id, includeLower: include),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterWhereClause> idLessThan(
|
||||
Id id,
|
||||
{bool include = false}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(
|
||||
IdWhereClause.lessThan(upper: id, includeUpper: include),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterWhereClause> idBetween(
|
||||
Id lowerId,
|
||||
Id upperId, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IdWhereClause.between(
|
||||
lower: lowerId,
|
||||
includeLower: includeLower,
|
||||
upper: upperId,
|
||||
includeUpper: includeUpper,
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TransactionNoteQueryFilter
|
||||
on QueryBuilder<TransactionNote, TransactionNote, QFilterCondition> {
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
idEqualTo(Id value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'id',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
idGreaterThan(
|
||||
Id value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'id',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
idLessThan(
|
||||
Id value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'id',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
idBetween(
|
||||
Id lower,
|
||||
Id upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'id',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
valueEqualTo(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'value',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
valueGreaterThan(
|
||||
String value, {
|
||||
bool include = false,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'value',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
valueLessThan(
|
||||
String value, {
|
||||
bool include = false,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'value',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
valueBetween(
|
||||
String lower,
|
||||
String upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'value',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
valueStartsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.startsWith(
|
||||
property: r'value',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
valueEndsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.endsWith(
|
||||
property: r'value',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
valueContains(String value, {bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.contains(
|
||||
property: r'value',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
valueMatches(String pattern, {bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.matches(
|
||||
property: r'value',
|
||||
wildcard: pattern,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
valueIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'value',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
valueIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
property: r'value',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TransactionNoteQueryObject
|
||||
on QueryBuilder<TransactionNote, TransactionNote, QFilterCondition> {}
|
||||
|
||||
extension TransactionNoteQueryLinks
|
||||
on QueryBuilder<TransactionNote, TransactionNote, QFilterCondition> {
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
transaction(FilterQuery<Transaction> q) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.link(q, r'transaction');
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterFilterCondition>
|
||||
transactionIsNull() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.linkLength(r'transaction', 0, true, 0, true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TransactionNoteQuerySortBy
|
||||
on QueryBuilder<TransactionNote, TransactionNote, QSortBy> {
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterSortBy> sortByValue() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'value', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterSortBy>
|
||||
sortByValueDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'value', Sort.desc);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TransactionNoteQuerySortThenBy
|
||||
on QueryBuilder<TransactionNote, TransactionNote, QSortThenBy> {
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterSortBy> thenById() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'id', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterSortBy> thenByIdDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'id', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterSortBy> thenByValue() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'value', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, TransactionNote, QAfterSortBy>
|
||||
thenByValueDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'value', Sort.desc);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TransactionNoteQueryWhereDistinct
|
||||
on QueryBuilder<TransactionNote, TransactionNote, QDistinct> {
|
||||
QueryBuilder<TransactionNote, TransactionNote, QDistinct> distinctByValue(
|
||||
{bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addDistinctBy(r'value', caseSensitive: caseSensitive);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TransactionNoteQueryProperty
|
||||
on QueryBuilder<TransactionNote, TransactionNote, QQueryProperty> {
|
||||
QueryBuilder<TransactionNote, int, QQueryOperations> idProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addPropertyName(r'id');
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TransactionNote, String, QQueryOperations> valueProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addPropertyName(r'value');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,13 +1,8 @@
|
|||
import 'package:isar/isar.dart';
|
||||
|
||||
// Used in Isar db and stored there as int indexes so adding/removing values
|
||||
// in this definition should be done extremely carefully in production
|
||||
enum LogLevel with IsarEnum<String> {
|
||||
enum LogLevel {
|
||||
Info,
|
||||
Warning,
|
||||
Error,
|
||||
Fatal;
|
||||
|
||||
@override
|
||||
String get value => name;
|
||||
}
|
||||
|
|
|
@ -281,6 +281,16 @@ class MockWallets extends _i1.Mock implements _i14.Wallets {
|
|||
List<_i5.ChangeNotifierProvider<_i6.Manager>>>{},
|
||||
) as Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>);
|
||||
@override
|
||||
List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin(
|
||||
_i15.Coin? coin) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getManagerProvidersForCoin,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[],
|
||||
) as List<_i5.ChangeNotifierProvider<_i6.Manager>>);
|
||||
@override
|
||||
_i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider(
|
||||
String? walletId) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -423,6 +423,11 @@ class MockTradesService extends _i1.Mock implements _i9.TradesService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i10.Trade? get(String? tradeId) => (super.noSuchMethod(Invocation.method(
|
||||
#get,
|
||||
[tradeId],
|
||||
)) as _i10.Trade?);
|
||||
@override
|
||||
_i7.Future<void> add({
|
||||
required _i10.Trade? trade,
|
||||
required bool? shouldNotifyListeners,
|
||||
|
|
|
@ -112,4 +112,29 @@ class MockSecureStorageWrapper extends _i1.Mock
|
|||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> deleteAll({
|
||||
_i4.IOSOptions? iOptions,
|
||||
_i4.AndroidOptions? aOptions,
|
||||
_i4.LinuxOptions? lOptions,
|
||||
_i4.WebOptions? webOptions,
|
||||
_i4.MacOsOptions? mOptions,
|
||||
_i4.WindowsOptions? wOptions,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteAll,
|
||||
[],
|
||||
{
|
||||
#iOptions: iOptions,
|
||||
#aOptions: aOptions,
|
||||
#lOptions: lOptions,
|
||||
#webOptions: webOptions,
|
||||
#mOptions: mOptions,
|
||||
#wOptions: wOptions,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
}
|
||||
|
|
|
@ -277,6 +277,16 @@ class MockWallets extends _i1.Mock implements _i14.Wallets {
|
|||
List<_i5.ChangeNotifierProvider<_i6.Manager>>>{},
|
||||
) as Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>);
|
||||
@override
|
||||
List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin(
|
||||
_i15.Coin? coin) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getManagerProvidersForCoin,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[],
|
||||
) as List<_i5.ChangeNotifierProvider<_i6.Manager>>);
|
||||
@override
|
||||
_i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider(
|
||||
String? walletId) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -177,6 +177,16 @@ class MockWallets extends _i1.Mock implements _i8.Wallets {
|
|||
List<_i5.ChangeNotifierProvider<_i6.Manager>>>{},
|
||||
) as Map<_i9.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>);
|
||||
@override
|
||||
List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin(
|
||||
_i9.Coin? coin) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getManagerProvidersForCoin,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[],
|
||||
) as List<_i5.ChangeNotifierProvider<_i6.Manager>>);
|
||||
@override
|
||||
_i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider(
|
||||
String? walletId) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -262,6 +262,16 @@ class MockWallets extends _i1.Mock implements _i13.Wallets {
|
|||
List<_i5.ChangeNotifierProvider<_i6.Manager>>>{},
|
||||
) as Map<_i14.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>);
|
||||
@override
|
||||
List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin(
|
||||
_i14.Coin? coin) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getManagerProvidersForCoin,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[],
|
||||
) as List<_i5.ChangeNotifierProvider<_i6.Manager>>);
|
||||
@override
|
||||
_i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider(
|
||||
String? walletId) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -280,6 +280,16 @@ class MockWallets extends _i1.Mock implements _i14.Wallets {
|
|||
List<_i5.ChangeNotifierProvider<_i6.Manager>>>{},
|
||||
) as Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>);
|
||||
@override
|
||||
List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin(
|
||||
_i15.Coin? coin) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getManagerProvidersForCoin,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[],
|
||||
) as List<_i5.ChangeNotifierProvider<_i6.Manager>>);
|
||||
@override
|
||||
_i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider(
|
||||
String? walletId) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -251,6 +251,16 @@ class MockWallets extends _i1.Mock implements _i12.Wallets {
|
|||
List<_i5.ChangeNotifierProvider<_i6.Manager>>>{},
|
||||
) as Map<_i13.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>);
|
||||
@override
|
||||
List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin(
|
||||
_i13.Coin? coin) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getManagerProvidersForCoin,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[],
|
||||
) as List<_i5.ChangeNotifierProvider<_i6.Manager>>);
|
||||
@override
|
||||
_i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider(
|
||||
String? walletId) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -276,6 +276,16 @@ class MockWallets extends _i1.Mock implements _i14.Wallets {
|
|||
List<_i5.ChangeNotifierProvider<_i6.Manager>>>{},
|
||||
) as Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>);
|
||||
@override
|
||||
List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin(
|
||||
_i15.Coin? coin) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getManagerProvidersForCoin,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[],
|
||||
) as List<_i5.ChangeNotifierProvider<_i6.Manager>>);
|
||||
@override
|
||||
_i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider(
|
||||
String? walletId) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -276,6 +276,16 @@ class MockWallets extends _i1.Mock implements _i14.Wallets {
|
|||
List<_i5.ChangeNotifierProvider<_i6.Manager>>>{},
|
||||
) as Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>);
|
||||
@override
|
||||
List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin(
|
||||
_i15.Coin? coin) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getManagerProvidersForCoin,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[],
|
||||
) as List<_i5.ChangeNotifierProvider<_i6.Manager>>);
|
||||
@override
|
||||
_i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider(
|
||||
String? walletId) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
Loading…
Reference in a new issue