-
-
Notifications
You must be signed in to change notification settings - Fork 49
Just a diff not intend to be merged #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.1.x
Are you sure you want to change the base?
Conversation
* Support rbac: unrestricted by default * Use generic inplace of RestrictedConnection in public API * guard behind feature flag `rbac`
Postgres + Axum: canonical SQLite + Poem: simple MySQL + Actix: classic
1. pickup DATABASE_URL from env 2. format lazy_static block properly 3. use sea_orm's register_entity_modules
Seaography already supports 'and' and 'or' operators on filters. This
commit adds a 'not' operator, which takes a filter object as an argument
and maps this onto the corresponding Condition not() method in SeaORM.
This is particularly useful for using operators that do not have an
inverse version, such as array contains. For example, in one use case,
we want to select all entities whose tags field does _not_ contain a
specific value:
{
runs(filters: {
not: { tags: { array_contains: ["disabled"] } }
}) {
nodes {
id
name
status
}
}
}
| basic_type_suffix: "Basic".into(), | ||
| }, | ||
| entity_query_field: EntityQueryFieldConfig { | ||
| combine_is_null_is_not_null: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now being enabled by default
| $builder = | ||
| $builder.register_related_entity_filter::<$module_path::Entity>(related_entity_filter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this implements "filter by related entity"
| sea_orm::query::Condition::any().add(sea_orm::sea_query::ConditionExpression::SimpleExpr( | ||
| sea_orm::sea_query::SimpleExpr::Constant(sea_orm::sea_query::Value::Bool(Some(false))), | ||
| )) | ||
| sea_orm::query::Condition::any().add(sea_orm::sea_query::Expr::val(false)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change to the underlying types
No description provided.