Releases: imperfect-fourth/eywa
Releases · imperfect-fourth/eywa
v0.4.0
v0.3.2
- add
order_by
query arg
v0.3.1
- change default generated file name from
eywa_fields.go
toeywa_generated.go
- set generated file name with an optional
--output-file
flag
v0.3.0
Introduce query variables for scalar types and json
, jsonb
types in update
query(can only be used in Set
for now)
type User struct {
ID int `json:"id"`
Name string `json:"name"`
Age *int `json:"age"` //nullable type
}
...
age := 10
Update[User]().Where(Eq(User_IDField(1)).Set(
User_NameVar("abcd"),
User_AgeVar(&age)
).Select(User_Name).Exec(client)
generated query:
mutation update_user($User_Name: String!, $User_Age: Int) {
update_user(where: {id: {_eq: 1}, _set: {name: $UserName}) {
name
}
}
Note how $User_Name
is a required String!
var, and $User_Name
is a nullable Int
var. This is inferred from the User
struct definition(string
, *int
, etc)
generated variables:
{
"User_Name": "abcd",
"User_Age": 10
}
v0.2.1
fix query generation for jsonb columns
v0.2.0
- More type-safety with
eywagen
- Added ClientOpts for customizing http client
- Reworked
WhereExpr
v0.1.1
fix module name
v0.1.0
Here we go 🚀
This release supports select
and update
operations.