[ckan-changes] [ckan/ckan] a29c73: [#1871] Add function to extract table names from S...

GitHub noreply at github.com
Wed Oct 1 12:10:26 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/ckan/ckan
  Commit: a29c730a972538ba370bd41458a754b5a0d02975
      https://github.com/ckan/ckan/commit/a29c730a972538ba370bd41458a754b5a0d02975
  Author: amercader <amercadero at gmail.com>
  Date:   2014-08-12 (Tue, 12 Aug 2014)

  Changed paths:
    M ckanext/datastore/helpers.py
    M ckanext/datastore/tests/test_helpers.py

  Log Message:
  -----------
  [#1871] Add function to extract table names from SQL statement

The function performs an EXPLAIN query with the provided statement and
parses its output looking for table names. It requires Postgres >= 9.x,
as it uses the FORMAT JSON option to get and parse a JSON objects.


  Commit: 9440de0e6188b2e197f12822d7dc5f5994f23119
      https://github.com/ckan/ckan/commit/9440de0e6188b2e197f12822d7dc5f5994f23119
  Author: amercader <amercadero at gmail.com>
  Date:   2014-08-12 (Tue, 12 Aug 2014)

  Changed paths:
    M ckanext/datastore/db.py
    M ckanext/datastore/tests/test_search.py

  Log Message:
  -----------
   [#1871] Disallow DataStore SQL queries involving system tables

 Using the `get_table_names_from_sql` helper function before running the
 provided statement, we raise a Validation error if some of the tables
 start with `pg_`.


  Commit: 80526f19fc1ce5426c1c103a1bb6744841c45e33
      https://github.com/ckan/ckan/commit/80526f19fc1ce5426c1c103a1bb6744841c45e33
  Author: amercader <amercadero at gmail.com>
  Date:   2014-08-12 (Tue, 12 Aug 2014)

  Changed paths:
    M ckanext/datastore/tests/test_helpers.py

  Log Message:
  -----------
  [#1871] Fix tests

PEP9 and skip the get table names tests if running on legacy mode.


  Commit: 686ad3aad6f66ef831dc2549247f3ccb0f880d43
      https://github.com/ckan/ckan/commit/686ad3aad6f66ef831dc2549247f3ccb0f880d43
  Author: amercader <amercadero at gmail.com>
  Date:   2014-08-12 (Tue, 12 Aug 2014)

  Changed paths:
    M ckanext/datastore/tests/test_helpers.py

  Log Message:
  -----------
  [#1871] Fix wrong call in tests


  Commit: f166300d72512084b1c407f573846d9bca3e0d51
      https://github.com/ckan/ckan/commit/f166300d72512084b1c407f573846d9bca3e0d51
  Author: joetsoi <joe.yeung.tsoi at gmail.com>
  Date:   2014-10-01 (Wed, 01 Oct 2014)

  Changed paths:
    M ckanext/datastore/db.py
    M ckanext/datastore/helpers.py
    M ckanext/datastore/tests/test_helpers.py
    M ckanext/datastore/tests/test_search.py

  Log Message:
  -----------
  Merge branch '1871-datastore-sql-tables-2'


Compare: https://github.com/ckan/ckan/compare/e8b0d442a2b3...f166300d7251


More information about the ckan-changes mailing list