namespace DBUtil { param strs return export const createAndQuery = ( strs ) : string => { if ( strs . length === 0 ) { return '' ; } let str = '' ; for ( let i = 0 ; i < strs . length ; i ++ ) { str += i === strs . length - 1 ? `(${ strs [ i ] })` : `(${ strs [ i ] }) and ` ; } return `(${ str })` ; } ; param strs return export const createOrQuery = ( strs ) : string => { let str = '' ; for ( let i = 0 ; i < strs . length ; i ++ ) { str += i === strs . length - 1 ? `(${ strs [ i ] })` : `(${ strs [ i ] }) or` ; } return `(${ str })` ; } ; } export default DBUtil ;