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

GitHub noreply at github.com
Fri Oct 3 13:52:05 UTC 2014


  Branch: refs/heads/release-v2.0.5
  Home:   https://github.com/ckan/ckan
  Commit: 1c09d05242468d2d643b0ad98c5791310666ab09
      https://github.com/ckan/ckan/commit/1c09d05242468d2d643b0ad98c5791310666ab09
  Author: amercader <amercadero at gmail.com>
  Date:   2014-10-03 (Fri, 03 Oct 2014)

  Changed paths:
    A ckanext/datastore/helpers.py
    A 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: 71cdd4beb2216be7c4513e80fcb578fe7fed6387
      https://github.com/ckan/ckan/commit/71cdd4beb2216be7c4513e80fcb578fe7fed6387
  Author: amercader <amercadero at gmail.com>
  Date:   2014-10-03 (Fri, 03 Oct 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_`.

Conflicts:
	ckanext/datastore/db.py
	ckanext/datastore/tests/test_search.py


  Commit: 1bee76eeab793d702ca54d1a64f55ffe46dce196
      https://github.com/ckan/ckan/commit/1bee76eeab793d702ca54d1a64f55ffe46dce196
  Author: amercader <amercadero at gmail.com>
  Date:   2014-10-03 (Fri, 03 Oct 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.

Conflicts:
	ckanext/datastore/tests/test_helpers.py


  Commit: 96eae4b30e471ac4f7f0db85cbfde97b17cdece9
      https://github.com/ckan/ckan/commit/96eae4b30e471ac4f7f0db85cbfde97b17cdece9
  Author: amercader <amercadero at gmail.com>
  Date:   2014-10-03 (Fri, 03 Oct 2014)

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

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


  Commit: 5da4518b0cebec751ac28f6892f7e53bd721675a
      https://github.com/ckan/ckan/commit/5da4518b0cebec751ac28f6892f7e53bd721675a
  Author: amercader <amercadero at gmail.com>
  Date:   2014-10-03 (Fri, 03 Oct 2014)

  Changed paths:
    M ckanext/datastore/db.py

  Log Message:
  -----------
  [#1871] Add import lost during bad merge


Compare: https://github.com/ckan/ckan/compare/358d02ee645c...5da4518b0ceb


More information about the ckan-changes mailing list