Sandro Santilli
82f965fa57
Upgrade node-pg dependency to 2.6.2
...
Simplifies PSQL.quoteIdentifier and exposes PSQL.quoteLiteral
2013-10-02 12:32:24 +02:00
Sandro Santilli
e92530d6e5
Fix shapefile export for non-linestring results starting with NULL
...
Includes tests. Closes #111 .
2013-10-02 12:12:09 +02:00
Sandro Santilli
0d84a704df
Fix missing .prj file in shapefile format
...
Finds srid, when needed, with an additional query.
Closes #110 .
Includes testcases.
2013-10-02 11:44:06 +02:00
Sandro Santilli
7f7ef682ac
Improve recognition of non-standard field types names by db lookup
...
Closes #112 .
Only looks up "geometry" and "raster" types for now, can be improved
over time.
2013-10-02 10:22:13 +02:00
Sandro Santilli
1ddec5fdd1
Add note about why we want to skip querying geometry_columns
2013-09-30 10:43:32 +02:00
Sandro Santilli
742936b2b8
Honour skipfields in JSON schema response. Closes #109
2013-09-26 13:26:45 +02:00
Sandro Santilli
a0ff7ee10c
Remove last bit of hard-coded format names from app controller
2013-09-05 17:10:48 +02:00
Sandro Santilli
f7bee2345d
Report boolean values as of boolean type, not string. Closes #106
2013-08-22 13:45:20 +02:00
Sandro Santilli
23d092f768
Use float parsing for int8 too
...
This makes us ready to upgrade to node-pg 2.x
2013-07-22 18:22:30 +02:00
Sandro Santilli
46b7f7a309
Parse all numbers as floats. Closes #100
2013-07-09 21:51:40 +02:00
Sandro Santilli
ae502335c3
Set "numeric" type to "number"
2013-07-09 21:51:08 +02:00
Sandro Santilli
ba28496127
Add support for "text" datatypes in json output format
2013-07-04 16:04:13 +02:00
javi
78a80e6c82
added string type
2013-07-04 15:47:09 +02:00
Sandro Santilli
5e379012a8
Add support for CTE in sql windowing, add unit tests
...
This is still an undocumented feature, but as long as it's present
and used (by cartodb UI) better tested than broken...
NOTE: more tests are needed for CTE and RETURNING queries
2013-06-17 16:36:36 +02:00
Sandro Santilli
88f1d33b42
Add "fields" member in JSON return. Closes #97
2013-06-14 18:36:05 +02:00
Luis Bosque
80452ef6f4
Merge branch 'release/staging' into develop
2013-05-30 11:17:10 +02:00
Luis Bosque
12afc3c88f
In OAuth requests, get req.path
...
Using req.route.path breaks OAuth whtn used with regex routes. Instead
of this we need to use req.path because the path is already expanded
2013-05-29 17:36:41 +02:00
Sandro Santilli
ffafe814ef
Do not hang up to queued request on ogr generation failure
2013-05-29 17:33:10 +02:00
Sandro Santilli
7f9463e7fd
Fix filesystem access conflict among clustered processes
2013-05-29 16:48:20 +02:00
Sandro Santilli
510ac0533f
Switch to using evented query model for postgresql
...
This enables formats for processing rows as they arrive from the
database, thus possibly reducing memory use. For a start the skip
fields are immediately removed from the result, rather than only
at the end.
2013-05-29 15:39:39 +02:00
javi
0be9e47930
Add arraybuffer format
2013-05-28 10:37:39 +02:00
Sandro Santilli
76705a3fd7
Refactor format objects to expose a common stream-able interface
...
See app/models/formats/README for info
2013-05-28 10:36:15 +02:00
Sandro Santilli
ab8494ab12
Survive postgresql connection losses. Closes #95 .
2013-05-24 18:18:17 +02:00
Sandro Santilli
11a61d16c4
Drop unused code. Spring cleanups! \o/
2013-05-24 17:13:05 +02:00
Sandro Santilli
7712d6f2a5
Expose PostgreSQL client pooling settings in environment files
...
Actually also moves to a real pooling model, managed by node-pg.
Closes #47
See .example files for new configurations
2013-05-24 12:09:06 +02:00
Sandro Santilli
64c0494105
Hide dangerous methods of the PSQL model class
...
These steps are prepatorial to recactoring to event-based model
2013-05-24 10:38:27 +02:00
Sandro Santilli
cf6bed9bdb
Bubble paging UI hack up from model to controller
...
... one day we'll need to completely drop this hack!
2013-05-24 10:22:17 +02:00
javi
c46e9786b5
refactor formats to external object
2013-05-24 08:50:03 +02:00
Sandro Santilli
e5ad8f0760
Fix test broken after oAuth interface change introduced in fcf95755
...
Also improve error message on miscall
2013-05-20 09:06:08 +02:00
Luis Bosque
fcf95755b6
Fixed problem identifying OAuth request protocol
...
The protocol of a OAuth request wasn't being identified correctly. It
always considered that the request protocol was https.
2013-05-14 18:01:37 +02:00
Sandro Santilli
e7437ba7cd
Rework system catalogue prevention access check to use CDB_QueryTables
...
This change reduces the chances of false positive
(forbidding legit queries). Doesn't solve the problem of false
negative (allowing illegit queries).
2013-04-09 12:36:37 +02:00
Sandro Santilli
d54d953e75
Another bit of improvement for the system-table query prevention
...
This work is more important for the testcases than the actual code
2013-04-09 12:20:27 +02:00
Sandro Santilli
1bcffbc68c
Make using SET or querying system catalogues harder
...
An hack to "prevent" querying system tables already existed but
was pretty weak. This commits makes that a bit stronger. The
filter for SET is new.
2013-04-09 11:52:34 +02:00
Sandro Santilli
6c0d7813f6
Upgrade generic-pool to ~2.0.2
2013-03-14 11:58:30 +01:00
Sandro Santilli
d4b1f580ff
Fix X-Cache-Channel computation with paging parameters. Closes #85 .
2013-02-18 16:19:12 +01:00
Sandro Santilli
b038419abd
Add missing newline
2012-10-18 11:35:06 +02:00
Sandro Santilli
729462b500
Fix throw in async function (verifyRequest)
2012-10-18 11:34:39 +02:00
Sandro Santilli
0a53d1cd17
Make PSQL.end a no-op, to avoid breaking pooled clients. Closes #48
2012-09-04 12:31:38 +02:00
Luis Bosque
86e1439c2c
Re-enabled the psql connections pooler. It is
...
essential.
Related to:
e36bfdef5b
2012-08-29 20:52:17 +02:00
Sandro Santilli
4723c028c9
Use the correct redis variable for checking map key ( closes #44 )
...
Includes testcase
2012-08-02 12:18:54 +02:00
Sandro Santilli
e36bfdef5b
Block while connecting, fixing #37
...
See https://github.com/brianc/node-postgres/issues/81
2012-07-12 20:13:47 +02:00
JM
907b0b0df5
skip redis with non-oauth requests
2012-06-30 01:54:21 +02:00
Simon Tokumine
b399fa3460
fix oauth signatures. thanks @javisantana
2012-04-13 19:34:59 +01:00
javi santana
59739483e8
added auth using api token
2011-12-26 19:16:41 +01:00
javi santana
6c003626b4
fixed oauth problems with POST requests fixes #10
2011-12-26 12:51:15 +01:00
Simon Tokumine
025f201ea8
add system table sanitizer
2011-11-22 00:06:14 +00:00
Simon Tokumine
8ebdd0474c
Add test for system tables
2011-11-21 23:06:38 +00:00
javi
4874568c5c
added staging enviorment
2011-09-16 13:43:10 +02:00
Simon Tokumine
4547ae932a
Reference bug
2011-09-07 16:58:53 +01:00
Simon Tokumine
47db0644c9
reverted to non-native bindings while we bug check the PQsendQuery error
2011-09-07 16:50:35 +01:00
Simon Tokumine
082807695c
updated error messages
2011-08-25 11:15:52 +01:00
Simon Tokumine
e19240c2dc
metadata tests and added getID
2011-08-24 13:46:36 +01:00
Simon Tokumine
e189aec262
added ability to query user metadata Redis data for database name from the request host
2011-08-23 21:42:27 +01:00
Simon Tokumine
c4f2195ed0
remove debug
2011-08-22 14:18:42 +01:00
Simon Tokumine
1d5444fa20
Added logging
2011-08-22 13:52:11 +01:00
Simon Tokumine
ce4413cbda
added body_hash to oauth check and stopped firing exception if incomplete oauth variables sent
2011-08-22 13:33:12 +01:00
Simon Tokumine
bb08f4f982
further fixes for public
2011-08-17 18:42:19 +01:00
Simon Tokumine
fd58592546
enable public user again
2011-08-17 17:32:54 +01:00
Simon Tokumine
fefa051450
added true oauth to application. got rid of bogus
2011-08-17 17:27:45 +01:00
Simon Tokumine
af4461cb58
test for select with uppercased SQL
2011-08-05 14:15:08 +01:00
Simon Tokumine
21f369aaf1
add lowercase too
2011-08-05 13:50:37 +01:00
Simon Tokumine
1a1493327f
patched windowing function to only work on selects
2011-08-05 13:35:32 +01:00
Simon Tokumine
6b67fc4877
catch page 0
2011-07-05 17:56:31 +01:00
Simon Tokumine
ae2890c42a
added rows_per_page and page to url params
2011-07-05 17:31:01 +01:00
Simon Tokumine
80ecdc565c
oauth
2011-06-20 15:39:12 +02:00
Simon Tokumine
a8731fa204
isolate redis pool settings into environment
2011-06-16 18:29:51 +02:00
Simon Tokumine
f47c611dfc
added redis pool, and fixed to use pg_bouncer
2011-06-16 18:23:38 +02:00
Simon Tokumine
870ae7d325
fix psql bug
2011-06-16 11:55:36 +02:00
Fernando Blat
21277ff9d2
Introduced a new parameter db_port to change it in a easy way
...
Some space and linebreaks cleaning
2011-06-13 12:31:50 +02:00
Simon Tokumine
bcd56de458
first draft, tidied, unit tests, modules, refactor, environments, see TODO for next steps"
2011-06-13 04:23:02 +01:00