build runner changes

This commit is contained in:
julian 2023-11-09 16:30:30 -06:00
parent f5bd1d22f6
commit bbeb958f21

View file

@ -82,12 +82,6 @@ const WalletInfoSchema = CollectionSchema(
id: 12, id: 12,
name: r'walletId', name: r'walletId',
type: IsarType.string, type: IsarType.string,
),
r'walletType': PropertySchema(
id: 13,
name: r'walletType',
type: IsarType.byte,
enumMap: _WalletInfowalletTypeEnumValueMap,
) )
}, },
estimateSize: _walletInfoEstimateSize, estimateSize: _walletInfoEstimateSize,
@ -169,7 +163,6 @@ void _walletInfoSerialize(
writer.writeLong(offsets[10], object.restoreHeight); writer.writeLong(offsets[10], object.restoreHeight);
writer.writeStringList(offsets[11], object.tokenContractAddresses); writer.writeStringList(offsets[11], object.tokenContractAddresses);
writer.writeString(offsets[12], object.walletId); writer.writeString(offsets[12], object.walletId);
writer.writeByte(offsets[13], object.walletType.index);
} }
WalletInfo _walletInfoDeserialize( WalletInfo _walletInfoDeserialize(
@ -192,9 +185,6 @@ WalletInfo _walletInfoDeserialize(
otherDataJsonString: reader.readStringOrNull(offsets[9]), otherDataJsonString: reader.readStringOrNull(offsets[9]),
restoreHeight: reader.readLongOrNull(offsets[10]) ?? 0, restoreHeight: reader.readLongOrNull(offsets[10]) ?? 0,
walletId: reader.readString(offsets[12]), walletId: reader.readString(offsets[12]),
walletType:
_WalletInfowalletTypeValueEnumMap[reader.readByteOrNull(offsets[13])] ??
WalletType.bip39,
); );
object.id = id; object.id = id;
return object; return object;
@ -235,10 +225,6 @@ P _walletInfoDeserializeProp<P>(
return (reader.readStringList(offset) ?? []) as P; return (reader.readStringList(offset) ?? []) as P;
case 12: case 12:
return (reader.readString(offset)) as P; return (reader.readString(offset)) as P;
case 13:
return (_WalletInfowalletTypeValueEnumMap[
reader.readByteOrNull(offset)] ??
WalletType.bip39) as P;
default: default:
throw IsarError('Unknown property with id $propertyId'); throw IsarError('Unknown property with id $propertyId');
} }
@ -268,18 +254,6 @@ const _WalletInfomainAddressTypeValueEnumMap = {
8: AddressType.nano, 8: AddressType.nano,
9: AddressType.banano, 9: AddressType.banano,
}; };
const _WalletInfowalletTypeEnumValueMap = {
'bip39': 0,
'bip39HD': 1,
'cryptonote': 2,
'privateKeyBased': 3,
};
const _WalletInfowalletTypeValueEnumMap = {
0: WalletType.bip39,
1: WalletType.bip39HD,
2: WalletType.cryptonote,
3: WalletType.privateKeyBased,
};
Id _walletInfoGetId(WalletInfo object) { Id _walletInfoGetId(WalletInfo object) {
return object.id; return object.id;
@ -1839,61 +1813,6 @@ extension WalletInfoQueryFilter
)); ));
}); });
} }
QueryBuilder<WalletInfo, WalletInfo, QAfterFilterCondition> walletTypeEqualTo(
WalletType value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'walletType',
value: value,
));
});
}
QueryBuilder<WalletInfo, WalletInfo, QAfterFilterCondition>
walletTypeGreaterThan(
WalletType value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
property: r'walletType',
value: value,
));
});
}
QueryBuilder<WalletInfo, WalletInfo, QAfterFilterCondition>
walletTypeLessThan(
WalletType value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
property: r'walletType',
value: value,
));
});
}
QueryBuilder<WalletInfo, WalletInfo, QAfterFilterCondition> walletTypeBetween(
WalletType lower,
WalletType upper, {
bool includeLower = true,
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.between(
property: r'walletType',
lower: lower,
includeLower: includeLower,
upper: upper,
includeUpper: includeUpper,
));
});
}
} }
extension WalletInfoQueryObject extension WalletInfoQueryObject
@ -2059,18 +1978,6 @@ extension WalletInfoQuerySortBy
return query.addSortBy(r'walletId', Sort.desc); return query.addSortBy(r'walletId', Sort.desc);
}); });
} }
QueryBuilder<WalletInfo, WalletInfo, QAfterSortBy> sortByWalletType() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'walletType', Sort.asc);
});
}
QueryBuilder<WalletInfo, WalletInfo, QAfterSortBy> sortByWalletTypeDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'walletType', Sort.desc);
});
}
} }
extension WalletInfoQuerySortThenBy extension WalletInfoQuerySortThenBy
@ -2242,18 +2149,6 @@ extension WalletInfoQuerySortThenBy
return query.addSortBy(r'walletId', Sort.desc); return query.addSortBy(r'walletId', Sort.desc);
}); });
} }
QueryBuilder<WalletInfo, WalletInfo, QAfterSortBy> thenByWalletType() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'walletType', Sort.asc);
});
}
QueryBuilder<WalletInfo, WalletInfo, QAfterSortBy> thenByWalletTypeDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'walletType', Sort.desc);
});
}
} }
extension WalletInfoQueryWhereDistinct extension WalletInfoQueryWhereDistinct
@ -2348,12 +2243,6 @@ extension WalletInfoQueryWhereDistinct
return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive);
}); });
} }
QueryBuilder<WalletInfo, WalletInfo, QDistinct> distinctByWalletType() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'walletType');
});
}
} }
extension WalletInfoQueryProperty extension WalletInfoQueryProperty
@ -2448,10 +2337,4 @@ extension WalletInfoQueryProperty
return query.addPropertyName(r'walletId'); return query.addPropertyName(r'walletId');
}); });
} }
QueryBuilder<WalletInfo, WalletType, QQueryOperations> walletTypeProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'walletType');
});
}
} }