Skip to content
This repository has been archived by the owner on Nov 27, 2019. It is now read-only.

Does not support column names with square brackets #21

Open
zarino opened this issue Mar 14, 2014 · 0 comments
Open

Does not support column names with square brackets #21

zarino opened this issue Mar 14, 2014 · 0 comments

Comments

@zarino
Copy link

zarino commented Mar 14, 2014

Discovered by @IanHopkinson over here: scraperwiki/datatables-view-tool#48

Given a database created with the following SQL commands:

CREATE TABLE data("hello[1]", "hello[^]", "goodbye");
INSERT INTO data VALUES ("first", "london", "berlin");
INSERT INTO data VALUES ("second", null, null);

Querying the database directly with the scraperwiki-python library:

import scraperwiki
print scraperwiki.sql.select('* from data')

Returns the incorrect column names:

[OrderedDict([
  (u'hello', u'london'), 
  (u'goodbye', u'berlin')
]), OrderedDict([
  (u'hello', None),
  (u'goodbye', None)
])]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant