{"action":"opened","issue":{"url":"https://api.github.com/repos/Jaymon/dump/issues/2","labels_url":"https://api.github.com/repos/Jaymon/dump/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Jaymon/dump/issues/2/comments","events_url":"https://api.github.com/repos/Jaymon/dump/issues/2/events","html_url":"https://github.com/Jaymon/dump/issues/2","id":59012445,"number":2,"title":"add callback_dump method","user":{"login":"Jaymon","id":125117,"avatar_url":"https://avatars.githubusercontent.com/u/125117?v=3","gravatar_id":"","url":"https://api.github.com/users/Jaymon","html_url":"https://github.com/Jaymon","followers_url":"https://api.github.com/users/Jaymon/followers","following_url":"https://api.github.com/users/Jaymon/following{/other_user}","gists_url":"https://api.github.com/users/Jaymon/gists{/gist_id}","starred_url":"https://api.github.com/users/Jaymon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jaymon/subscriptions","organizations_url":"https://api.github.com/users/Jaymon/orgs","repos_url":"https://api.github.com/users/Jaymon/repos","events_url":"https://api.github.com/users/Jaymon/events{/privacy}","received_events_url":"https://api.github.com/users/Jaymon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Jaymon/dump/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-26T03:28:26Z","updated_at":"2015-02-26T03:28:26Z","closed_at":null,"body":"this method will allow a function to be run that will return a list of queries that will be used to back up the table\r\n\r\n```python\r\ndef callback_dump(self, table, callback, outfile=None, pipes=None):\r\n        '''\r\n        callback -- function -- should return one or more raw sql queries\r\n        '''\r\n        if not table: raise ValueError('no table')\r\n\r\n        ret = False\r\n        queries = callback(table)\r\n        if queries:\r\n            ret = self.select_dump(table=table, queries=queries, outfile=outfile, pipes=pipes)\r\n\r\n        return ret\r\n```"}}