W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
allEq(Map<R, V> params)
allEq(Map<R, V> params, boolean null2IsNull)
allEq(boolean condition, Map<R, V> params, boolean null2IsNull)
eq
?(或個(gè)別?isNull
?)個(gè)別參數(shù)說明:
params
?: ?key
?為數(shù)據(jù)庫字段名,?value
?為字段值null2IsNull
: 為?true
?則在?map
?的?value
?為?null
?時(shí)調(diào)用 ?isNull
方法,為?false
?時(shí)則忽略?value
?為?null
?的例1: ?allEq({id:1,name:"老王",age:null})--->id = 1 and name = '老王' and age is null
?
例2: ?allEq({id:1,name:"老王",age:null}, false)--->id = 1 and name = '老王'
?
allEq(BiPredicate<R, V> filter, Map<R, V> params)
allEq(BiPredicate<R, V> filter, Map<R, V> params, boolean null2IsNull)
allEq(boolean condition, BiPredicate<R, V> filter, Map<R, V> params, boolean null2IsNull)
個(gè)別參數(shù)說明:
filter
: 過濾函數(shù),是否允許字段傳入比對(duì)條件中params
與 null2IsNull : 同上例1: ?allEq((k,v) -> k.indexOf("a") >= 0, {id:1,name:"老王",age:null})--->name = '老王' and age is null
?
例2: ?allEq((k,v) -> k.indexOf("a") >= 0, {id:1,name:"老王",age:null}, false)--->name = '老王'
?
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: