You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 24, 2024. It is now read-only.
All ElectricTypes custom types currently implement DialectAwareSqlType via CustomElectricTypeGeneric. Which is great, but there is currently a bug in drift which, when creating variables via query builders, it does not correctly pass through the electric type as the helper is checking against CustomSqlType and not UserDefinedSqlType.
/// Utilities to derive other expressions with a type compatible to `this`
/// expression.
extension WithTypes<T extends Object> on Expression<T> {
/// Creates a variable with a matching [driftSqlType].
Variable<T> variable(T? value) {
return switch (driftSqlType) {
CustomSqlType<T> custom => Variable(value, custom),
_ => Variable(value),
};
}
}
I've currently opened a PR to type-check against UserDefinedSqlType instead of CustomSqlType as that is what the Variable constructor is expecting: simolus3/drift#2909
This is more of an FYI issue as queries on for example the Postgres date type are currently not working in Electric Dart.
The text was updated successfully, but these errors were encountered:
All
ElectricTypes
custom types currently implementDialectAwareSqlType
viaCustomElectricTypeGeneric
. Which is great, but there is currently a bug in drift which, when creating variables via query builders, it does not correctly pass through the electric type as the helper is checking againstCustomSqlType
and notUserDefinedSqlType
.See: https://github.com/SkillDevs/electric_dart/blob/master/packages/electricsql/lib/src/client/conversions/custom_types.dart
Helper:
I've currently opened a PR to type-check against
UserDefinedSqlType
instead ofCustomSqlType
as that is what theVariable
constructor is expecting: simolus3/drift#2909This is more of an FYI issue as queries on for example the Postgres date type are currently not working in Electric Dart.
The text was updated successfully, but these errors were encountered: