@@ -132,10 +132,10 @@ pub fn type_insert(insert: SqlInsert, tx: &impl SchemaView) -> TypingResult<Tabl
132
132
values. push ( AlgebraicValue :: String ( v) ) ;
133
133
}
134
134
( SqlLiteral :: Bool ( _) , _) => {
135
- return Err ( UnexpectedType :: new ( & AlgebraicType :: Bool , ty ) . into ( ) ) ;
135
+ return Err ( UnexpectedType :: new ( ty , & AlgebraicType :: Bool ) . into ( ) ) ;
136
136
}
137
137
( SqlLiteral :: Str ( _) , _) => {
138
- return Err ( UnexpectedType :: new ( & AlgebraicType :: String , ty ) . into ( ) ) ;
138
+ return Err ( UnexpectedType :: new ( ty , & AlgebraicType :: String ) . into ( ) ) ;
139
139
}
140
140
( SqlLiteral :: Hex ( v) , ty) | ( SqlLiteral :: Num ( v) , ty) => {
141
141
values. push ( parse ( & v, ty) . map_err ( |_| InvalidLiteral :: new ( v. into_string ( ) , ty) ) ?) ;
@@ -199,10 +199,10 @@ pub fn type_update(update: SqlUpdate, tx: &impl SchemaView) -> TypingResult<Tabl
199
199
values. push ( ( * col_id, AlgebraicValue :: String ( v) ) ) ;
200
200
}
201
201
( SqlLiteral :: Bool ( _) , _) => {
202
- return Err ( UnexpectedType :: new ( & AlgebraicType :: Bool , ty ) . into ( ) ) ;
202
+ return Err ( UnexpectedType :: new ( ty , & AlgebraicType :: Bool ) . into ( ) ) ;
203
203
}
204
204
( SqlLiteral :: Str ( _) , _) => {
205
- return Err ( UnexpectedType :: new ( & AlgebraicType :: String , ty ) . into ( ) ) ;
205
+ return Err ( UnexpectedType :: new ( ty , & AlgebraicType :: String ) . into ( ) ) ;
206
206
}
207
207
( SqlLiteral :: Hex ( v) , ty) | ( SqlLiteral :: Num ( v) , ty) => {
208
208
values. push ( (
0 commit comments