{"action":"created","issue":{"url":"https://api.github.com/repos/web2py/pydal/issues/303","labels_url":"https://api.github.com/repos/web2py/pydal/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/web2py/pydal/issues/303/comments","events_url":"https://api.github.com/repos/web2py/pydal/issues/303/events","html_url":"https://github.com/web2py/pydal/issues/303","id":113267516,"number":303,"title":"_select() storing query information in adapter object","user":{"login":"stephenrauch","id":10407290,"avatar_url":"https://avatars.githubusercontent.com/u/10407290?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenrauch","html_url":"https://github.com/stephenrauch","followers_url":"https://api.github.com/users/stephenrauch/followers","following_url":"https://api.github.com/users/stephenrauch/following{/other_user}","gists_url":"https://api.github.com/users/stephenrauch/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenrauch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenrauch/subscriptions","organizations_url":"https://api.github.com/users/stephenrauch/orgs","repos_url":"https://api.github.com/users/stephenrauch/repos","events_url":"https://api.github.com/users/stephenrauch/events{/privacy}","received_events_url":"https://api.github.com/users/stephenrauch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-26T01:06:49Z","updated_at":"2015-12-04T17:04:41Z","closed_at":null,"body":"In ```adapters/base/_select()```, query specific information is being stored in the adapter. If the sql returned by ```_select()``` is later used after another select with a different table or columns, this construct seems like it would fail.\r\n\r\n```python\r\ndef _select(self, query, fields, attributes):\r\n   ...\r\n   self._colnames = list(map(colexpand, fields))\r\n```\r\n\r\nDon't know the best way to fix this since ```_select()``` currently returns just a string. But could change it to return something like:\r\n\r\n```python\r\nclass SqlString(str):\r\n    def colnames(self, colnames=None):\r\n        if colnames is not None:\r\n            self._colnames = colnames\r\n        return self._colnames\r\n```\r\n\r\nIf this approach seems satisfactory, you can assign this to me, if not satisfactory please discuss..."},"comment":{"url":"https://api.github.com/repos/web2py/pydal/issues/comments/162022765","html_url":"https://github.com/web2py/pydal/issues/303#issuecomment-162022765","issue_url":"https://api.github.com/repos/web2py/pydal/issues/303","id":162022765,"user":{"login":"mdipierro","id":965839,"avatar_url":"https://avatars.githubusercontent.com/u/965839?v=3","gravatar_id":"","url":"https://api.github.com/users/mdipierro","html_url":"https://github.com/mdipierro","followers_url":"https://api.github.com/users/mdipierro/followers","following_url":"https://api.github.com/users/mdipierro/following{/other_user}","gists_url":"https://api.github.com/users/mdipierro/gists{/gist_id}","starred_url":"https://api.github.com/users/mdipierro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdipierro/subscriptions","organizations_url":"https://api.github.com/users/mdipierro/orgs","repos_url":"https://api.github.com/users/mdipierro/repos","events_url":"https://api.github.com/users/mdipierro/events{/privacy}","received_events_url":"https://api.github.com/users/mdipierro/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T17:04:41Z","updated_at":"2015-12-04T17:04:41Z","body":"I do not oppose to this but this seems work that would benefit very few use cases. So Stephen, it you want to do it, I will add it."}}