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
Not exactly an issue, but a guide on how to support a new type in SeaQuery.
It usually starts from ColumnType where we'd add the type, so that it can be used in schema statements
If the type has a native representation (like UUID), we can add a variant to the enum Value (and ArrayType) and implement all necessary traits (ValueType)
we should also determine the JSON serialisation (most likely string) which is implemented in sea_value_to_json_value
Feature guards i.e. #[cfg(feature = "with-uuid")] are needed
We shouldn't depend on sqlx directly in the sea-query crate, so if a type is only defined in sqlx, we have to copy the struct and put it inside sea-query
In sea-query-binder & sea-query-postgres, we then perform the type conversion and binding
Finally, in sea-orm, we should implement TryGetable for the right backend
Not exactly an issue, but a guide on how to support a new type in SeaQuery.
ColumnType
where we'd add the type, so that it can be used in schema statementsValue
(andArrayType
) and implement all necessary traits (ValueType
)sea_value_to_json_value
#[cfg(feature = "with-uuid")]
are neededsqlx
directly in thesea-query
crate, so if a type is only defined insqlx
, we have to copy the struct and put it insidesea-query
sea-query-binder
&sea-query-postgres
, we then perform the type conversion and bindingsea-orm
, we should implementTryGetable
for the right backendReference:
(ipnetwork)
#309
#364
#503
(time)
#267
SeaQL/sea-orm#602
The text was updated successfully, but these errors were encountered: