{"action":"created","issue":{"url":"https://api.github.com/repos/cequel/cequel/issues/222","labels_url":"https://api.github.com/repos/cequel/cequel/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/cequel/cequel/issues/222/comments","events_url":"https://api.github.com/repos/cequel/cequel/issues/222/events","html_url":"https://github.com/cequel/cequel/pull/222","id":59304978,"number":222,"title":"Handle camel cased methods or methods containing periods","user":{"login":"kemper","id":56835,"avatar_url":"https://avatars.githubusercontent.com/u/56835?v=3","gravatar_id":"","url":"https://api.github.com/users/kemper","html_url":"https://github.com/kemper","followers_url":"https://api.github.com/users/kemper/followers","following_url":"https://api.github.com/users/kemper/following{/other_user}","gists_url":"https://api.github.com/users/kemper/gists{/gist_id}","starred_url":"https://api.github.com/users/kemper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kemper/subscriptions","organizations_url":"https://api.github.com/users/kemper/orgs","repos_url":"https://api.github.com/users/kemper/repos","events_url":"https://api.github.com/users/kemper/events{/privacy}","received_events_url":"https://api.github.com/users/kemper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-27T22:38:34Z","updated_at":"2015-04-24T18:36:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cequel/cequel/pulls/222","html_url":"https://github.com/cequel/cequel/pull/222","diff_url":"https://github.com/cequel/cequel/pull/222.diff","patch_url":"https://github.com/cequel/cequel/pull/222.patch"},"body":"I was spiking using your gem for an app that has an existing table schema with columns that have camel cased names and names with periods in them. In CQL, these just need to be escaped with quotes. I've gone through and changed all the places that generate CQL that would need to be changed to handle this.\r\n\r\nThe associated specs I modified failed before I added the non-test code to fix them, let me know if other specs are needed.\r\n\r\nThis was tested with Cassandra 2.0.8.39.\r\n"},"comment":{"url":"https://api.github.com/repos/cequel/cequel/issues/comments/96027492","html_url":"https://github.com/cequel/cequel/pull/222#issuecomment-96027492","issue_url":"https://api.github.com/repos/cequel/cequel/issues/222","id":96027492,"user":{"login":"outoftime","id":14214,"avatar_url":"https://avatars.githubusercontent.com/u/14214?v=3","gravatar_id":"","url":"https://api.github.com/users/outoftime","html_url":"https://github.com/outoftime","followers_url":"https://api.github.com/users/outoftime/followers","following_url":"https://api.github.com/users/outoftime/following{/other_user}","gists_url":"https://api.github.com/users/outoftime/gists{/gist_id}","starred_url":"https://api.github.com/users/outoftime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outoftime/subscriptions","organizations_url":"https://api.github.com/users/outoftime/orgs","repos_url":"https://api.github.com/users/outoftime/repos","events_url":"https://api.github.com/users/outoftime/events{/privacy}","received_events_url":"https://api.github.com/users/outoftime/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T18:36:49Z","updated_at":"2015-04-24T18:36:49Z","body":"@kemper thanks, this looks like it required a lot of effort, and it's clearly a change for the better. I have two overall concerns:\r\n\r\n1. I think we need a `quote_column_name` method somewhere—as it stands in this PR the knowledge of how to quote a column name is duplicated many times over. As a corollary, is the quoting logic complete here? In particular, is it possible for a column name to contain a `\"` character? (I can't readily find an answer to that question in the documentation)\r\n2. I use dynamic source code evaluation in favor of `define_method` intentionally, because `define_method` causes the method definition to carry the additional baggage of the lexical context in which it was defined. I'd be happy to debate that convention on the merits, but let's do so in a separate pull request."}}