Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
baybal
@baybal
@avelino I want to try to fix #340 , where should I start looking where the escaping issue happens?
baybal
@baybal
I tracked it down to this insertTableNameQuotesRegex = regexp.MustCompile((?i)INTO\s+([\w|.|"].)"(\w+)"\s*()
For the secondary capture group, we can do (?i)INTO\s+([\w.|"].)"([^"']+|'['"]+)"\s*(
But for the first...
Can somebody help me with it?
(?i)INTO\s+((?:[^"']|"|'{2})*\.)*"((?:[^"']|'{2}|'")+)"\s*\(
this is the best I came up with
but it can't catch unescaped doublequote character inside first capture group
baybal
@baybal
(?i)INTO\s+((?:"(?:[^"]|"{2})+"*\.){2})"((?:[^"]|"{2})+)"\s*\( I think that's it
Hai Nguyen
@greentornado
https://postgres.rest/batch-operations/ ==> does prest support batch put method => update data for multiple rows ?
Avelino
@avelino
Not today
baybal
@baybal
@avelino I went through postgres.go. Was prest made without consideration for quote delimited identifiers as such?
for example, in filters and join syntax, there are no ways to escape control characters
Am I right?
If this was my own project, I would've opted for getting query parsing out of postgres.go, so you can keep all parsing and validation code in one place
baybal
@baybal
Even better, throw FLEX or Bison on that
such tweets
@unpaik_twitter
Hello and thanks for the useful framework! I am trying to extend it by adding routes, and am trying to implement some logic in the handler function but I can't find documentation. How would you advise to implement a handler that executes an sql query and reads the contents of the result set? Should I use the adapters package? If I use adapters.Query or adapters.QueryCount, a Scanner type is returned and the contents of the query result have already been marshal'd into []byte. Any advice? Thanks
Every Go db tutorial explains how to read the contents of the result set by calling .Scan() on *Row type, but with Query (or QueryCount) the returned type is Scanner. Scanner only offers Scan, Bytes and Err
such tweets
@unpaik_twitter
It feels that I am not meant to use Query method for my custom queries and logic, can you confirm please?
such tweets
@unpaik_twitter
hope someone sees this :) @avelino @baybal
such tweets
@unpaik_twitter
I may have found a way, please confirm if this is true. I am now marshaling the returned []byte type to a []map[string]interface{} to get the results of the query
shugydw
@shugydw
Hi. I am not sure why but calling prest POST operation twice (inserting value in two tables) throws an error on the second operation.
It is totally random, as the operations succeed sometimes and fails sometimes
Any help?
The error is pq: database "users" does not exist". Note: It exists
Also debug=true does not output any error for prest logs
Cesar Gimenes
@crgimenes
@shugydw open issue this error pls
hchinyavada
@hchinyavada
hie, how do i start the prest service
Chris Camel
@ccamel

Hello. We are currently using prest as a docker image. Until now, we were using the latest image tag. But, when switching to the latest version available (prest/prest:v0.3.4), the container failed to start:

OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"/prest\": stat /prest: no such file or directory": unknown.

We think there's a mismatch of the build prest binary file.

Hubert Baumgartner
@hubertba
hello ... does anyone have a working example of the prest angular component for angular7 ? I would like to create a tutorial on how to use it, but I already fail in trying it myself ....
any help appreciated :-)
Avelino
@avelino
Sorry, angular 7 not doesn’t support today :worried: , you help project to add support pls ?
such tweets
@unpaik_twitter
hello, I am trying to use the example for disabling JWT and it doesn't work. There is a bug in the jwt middleware, where the encryption algorithm is missing. Even if I add the extra string back the middleware doesn't work. Can you please try running the example and let me know if it works for you? Thanks!
such tweets
@unpaik_twitter
any help please would be much much appreciated, thanks
Chris Camel
@ccamel
@unpaik_twitter
Is it related to prest/prest#308 ?
mateusscheper
@mateusscheper

hi! I'm trying to use prest on ionic but I'm getting the cors error. Access to XMLHttpRequest at 'http://192.168.1.5:3010/itens/public/users' from origin 'http://192.168.1.5:8100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I already set alloworigin = ["http://192.168.1.5:8100"]. What am I doing wrong?

machengling
@machengling
hello,How to implement like (update table set count=count+1 where id=xxx)
Avelino
@avelino
@machengling open issue, like your condition count+1, is
very very utils
Bnaya Peretz
@Bnaya
Hey!
Any info how to deploy on appengine?
orivas
@orivascordero_twitter
Hi guys. I'm dead with CORS. Does someone know how to disable it in postgres?
zzzzzero000
@zzzzzero000
Why should I be underlined before the page?
zzzzzero000
@zzzzzero000
Is anyone here?
Joel M. de Souza
@joelmdesouza

Why should I be underlined before the page?

Sorry i don't understood. Make a exemple, please.

Niklas Kolster
@NiklasKolster_twitter
Hi
Anyone set-up prest for multiple users or have hints or pointers how to do it? Could not find in the basic documentation
Adam Machnikowski
@adam_of_mac_twitter
does anyone know if it is possible to change access-control-allow-header from wildcard to specific headers? Because I have a customer that needs this to work on iOS and I would prefer a simple solution, rather then adding an extra proxy to change headers...
Adam Machnikowski
@adam_of_mac_twitter
I found a trace of allowheaders setting in the github repo (seems similar to alloworigin) but I can't get it to work :/
progenysw
@progenysw
is this product still active?