我需要用一些謂詞撰寫graphql查詢
Select * from User Where loginId like "abc%"
在 GraphQL 中:
{
getWithPredicate(clazz : String, predicates : Predicates){
loginId
enabled
accountLocked
accountExpired
accountExpireBy
createdBy
}
}
請建議,如果 graphql 中有任何默認實作可用。
提前致謝。
uj5u.com熱心網友回復:
這個有可能。我曾經寫過這樣的查詢。我需要使用一些搜索詞來搜索資料庫。
query ($title: String!, $company: String!, $city: String!, $investor: String!) {
jobs(
where: {
and: [
{ title: { ilike: $title } },
{ company: { name: { ilike: $company } } },
{ city: { ilike: $city } },
{company: {company_investors:{investor:{name: {ilike: $investor}}}}}
]
}
) {
id
title
city
company {
name
id
company_investors {
investor {
name
id
}
}
}
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/513441.html
標籤:爪哇弹簧靴休息jpa图形
上一篇:是在資料庫中通過orderby對List進行排序邏輯更好,還是在Java邏輯中使用Collection.sort()更好?
