Explorar el Código

postgrest: evaluate value if a function is provided

master
Bing Sun hace 5 años
padre
commit
f9eee9a728
Firmado por: sunb ID de clave GPG: F7795F8C590626AB
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. +5
    -0
      src/postgrest.js

+ 5
- 0
src/postgrest.js Ver fichero

@@ -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') {


Cargando…
Cancelar
Guardar