Ver a proveniência

postgrest: evaluate value if a function is provided

master
Bing Sun há 5 anos
ascendente
cometimento
f9eee9a728
Assinados por: sunb ID da chave GPG: F7795F8C590626AB
1 ficheiros alterados com 5 adições e 0 eliminações
  1. +5
    -0
      src/postgrest.js

+ 5
- 0
src/postgrest.js Ver ficheiro

@@ -174,6 +174,11 @@ export default (api_root, auth={}) => {
if (typeof v == 'undefined' || (!v && v !== 0))
return undefined

// generate value if v is a function
if (typeof v == 'function')
v = v()

// format v on k & op
if (op == 'like')
v = `*${v}*`
else if (op == 'like.right') {


Carregando…
Cancelar
Guardar