{"action":"created","comment":{"url":"https://api.github.com/repos/doug-martin/goqu/pulls/comments/73180920","id":73180920,"diff_hunk":"@@ -726,6 +733,33 @@ func (me *DefaultAdapter) BooleanExpressionSql(buf *SqlBuilder, operator Boolean\n \treturn nil\n }\n \n+//Generates SQL for a RangeExpresion (e.g. I(\"a\").Between(2,5) -> \"a\" BETWEEN 2 AND 5)\n+func (me *DefaultAdapter) RangeExpressionSql(buf *SqlBuilder, operator RangeExpression) error {\n+\tbuf.WriteRune(left_paren_rune)\n+\tif err := me.Literal(buf, operator.Lhs()); err != nil {\n+\t\treturn err\n+\t}\n+\tbuf.WriteRune(space_rune)\n+\toperatorOp := operator.Op()\n+\tif val, ok := me.RangeOperatorLookup[operatorOp]; ok {\n+\t\tbuf.Write(val)\n+\t} else {\n+\t\treturn NewGoquError(\"Range operator %+v not supported\", operatorOp)\n+\t}\n+\trhs1 := operator.Rhs1()\n+\trhs2 := operator.Rhs2()\n+\tbuf.WriteRune(space_rune)\n+\tif err := me.Literal(buf, rhs1); err != nil {\n+\t\treturn err\n+\t}\n+\tbuf.WriteString(\" AND \")","path":"default_adapter.go","position":51,"original_position":51,"commit_id":"7d421decfe96a17af5de12b60b5ff0cd49669215","original_commit_id":"7d421decfe96a17af5de12b60b5ff0cd49669215","user":{"login":"doug-martin","id":361261,"avatar_url":"https://avatars.githubusercontent.com/u/361261?v=3","gravatar_id":"","url":"https://api.github.com/users/doug-martin","html_url":"https://github.com/doug-martin","followers_url":"https://api.github.com/users/doug-martin/followers","following_url":"https://api.github.com/users/doug-martin/following{/other_user}","gists_url":"https://api.github.com/users/doug-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/doug-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doug-martin/subscriptions","organizations_url":"https://api.github.com/users/doug-martin/orgs","repos_url":"https://api.github.com/users/doug-martin/repos","events_url":"https://api.github.com/users/doug-martin/events{/privacy}","received_events_url":"https://api.github.com/users/doug-martin/received_events","type":"User","site_admin":false},"body":"I think you can use the `default_and_fragment` here","created_at":"2016-08-02T15:41:01Z","updated_at":"2016-08-02T15:41:01Z","html_url":"https://github.com/doug-martin/goqu/pull/25#discussion_r73180920","pull_request_url":"https://api.github.com/repos/doug-martin/goqu/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/doug-martin/goqu/pulls/comments/73180920"},"html":{"href":"https://github.com/doug-martin/goqu/pull/25#discussion_r73180920"},"pull_request":{"href":"https://api.github.com/repos/doug-martin/goqu/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/doug-martin/goqu/pulls/25","id":79755538,"html_url":"https://github.com/doug-martin/goqu/pull/25","diff_url":"https://github.com/doug-martin/goqu/pull/25.diff","patch_url":"https://github.com/doug-martin/goqu/pull/25.patch","issue_url":"https://api.github.com/repos/doug-martin/goqu/issues/25","number":25,"state":"open","locked":false,"title":"Add range clauses ([NOT] BETWEEN) support","user":{"login":"denisvm","id":2728948,"avatar_url":"https://avatars.githubusercontent.com/u/2728948?v=3","gravatar_id":"","url":"https://api.github.com/users/denisvm","html_url":"https://github.com/denisvm","followers_url":"https://api.github.com/users/denisvm/followers","following_url":"https://api.github.com/users/denisvm/following{/other_user}","gists_url":"https://api.github.com/users/denisvm/gists{/gist_id}","starred_url":"https://api.github.com/users/denisvm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisvm/subscriptions","organizations_url":"https://api.github.com/users/denisvm/orgs","repos_url":"https://api.github.com/users/denisvm/repos","events_url":"https://api.github.com/users/denisvm/events{/privacy}","received_events_url":"https://api.github.com/users/denisvm/received_events","type":"User","site_admin":false},"body":"Implementation of range clauses for BETWEEN and NOT BETWEEN.\r\n\r\n```go\r\nsql, _, _ = db.From(\"test\").Where(goqu.L(\"(a + b)\").Between(10,100)).ToSql()\r\nfmt.Println(sql)\r\n// prints: SELECT * FROM \"test\" WHERE ((a + b) BETWEEN 10 AND 100)\r\n```\r\n\r\nPS: I've not found a clean way yet to implement the expression mapping in `mapToExpressionList` function.","created_at":"2016-08-02T15:25:24Z","updated_at":"2016-08-02T15:41:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e0cba725f7719a898b3c419cb611030454c2fde","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/doug-martin/goqu/pulls/25/commits","review_comments_url":"https://api.github.com/repos/doug-martin/goqu/pulls/25/comments","review_comment_url":"https://api.github.com/repos/doug-martin/goqu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doug-martin/goqu/issues/25/comments","statuses_url":"https://api.github.com/repos/doug-martin/goqu/statuses/7d421decfe96a17af5de12b60b5ff0cd49669215","head":{"label":"denisvm:expression-between","ref":"expression-between","sha":"7d421decfe96a17af5de12b60b5ff0cd49669215","user":{"login":"denisvm","id":2728948,"avatar_url":"https://avatars.githubusercontent.com/u/2728948?v=3","gravatar_id":"","url":"https://api.github.com/users/denisvm","html_url":"https://github.com/denisvm","followers_url":"https://api.github.com/users/denisvm/followers","following_url":"https://api.github.com/users/denisvm/following{/other_user}","gists_url":"https://api.github.com/users/denisvm/gists{/gist_id}","starred_url":"https://api.github.com/users/denisvm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisvm/subscriptions","organizations_url":"https://api.github.com/users/denisvm/orgs","repos_url":"https://api.github.com/users/denisvm/repos","events_url":"https://api.github.com/users/denisvm/events{/privacy}","received_events_url":"https://api.github.com/users/denisvm/received_events","type":"User","site_admin":false},"repo":{"id":64716884,"name":"goqu","full_name":"denisvm/goqu","owner":{"login":"denisvm","id":2728948,"avatar_url":"https://avatars.githubusercontent.com/u/2728948?v=3","gravatar_id":"","url":"https://api.github.com/users/denisvm","html_url":"https://github.com/denisvm","followers_url":"https://api.github.com/users/denisvm/followers","following_url":"https://api.github.com/users/denisvm/following{/other_user}","gists_url":"https://api.github.com/users/denisvm/gists{/gist_id}","starred_url":"https://api.github.com/users/denisvm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisvm/subscriptions","organizations_url":"https://api.github.com/users/denisvm/orgs","repos_url":"https://api.github.com/users/denisvm/repos","events_url":"https://api.github.com/users/denisvm/events{/privacy}","received_events_url":"https://api.github.com/users/denisvm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/denisvm/goqu","description":"SQL builder and query library for golang","fork":true,"url":"https://api.github.com/repos/denisvm/goqu","forks_url":"https://api.github.com/repos/denisvm/goqu/forks","keys_url":"https://api.github.com/repos/denisvm/goqu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/denisvm/goqu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/denisvm/goqu/teams","hooks_url":"https://api.github.com/repos/denisvm/goqu/hooks","issue_events_url":"https://api.github.com/repos/denisvm/goqu/issues/events{/number}","events_url":"https://api.github.com/repos/denisvm/goqu/events","assignees_url":"https://api.github.com/repos/denisvm/goqu/assignees{/user}","branches_url":"https://api.github.com/repos/denisvm/goqu/branches{/branch}","tags_url":"https://api.github.com/repos/denisvm/goqu/tags","blobs_url":"https://api.github.com/repos/denisvm/goqu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/denisvm/goqu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/denisvm/goqu/git/refs{/sha}","trees_url":"https://api.github.com/repos/denisvm/goqu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/denisvm/goqu/statuses/{sha}","languages_url":"https://api.github.com/repos/denisvm/goqu/languages","stargazers_url":"https://api.github.com/repos/denisvm/goqu/stargazers","contributors_url":"https://api.github.com/repos/denisvm/goqu/contributors","subscribers_url":"https://api.github.com/repos/denisvm/goqu/subscribers","subscription_url":"https://api.github.com/repos/denisvm/goqu/subscription","commits_url":"https://api.github.com/repos/denisvm/goqu/commits{/sha}","git_commits_url":"https://api.github.com/repos/denisvm/goqu/git/commits{/sha}","comments_url":"https://api.github.com/repos/denisvm/goqu/comments{/number}","issue_comment_url":"https://api.github.com/repos/denisvm/goqu/issues/comments{/number}","contents_url":"https://api.github.com/repos/denisvm/goqu/contents/{+path}","compare_url":"https://api.github.com/repos/denisvm/goqu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/denisvm/goqu/merges","archive_url":"https://api.github.com/repos/denisvm/goqu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/denisvm/goqu/downloads","issues_url":"https://api.github.com/repos/denisvm/goqu/issues{/number}","pulls_url":"https://api.github.com/repos/denisvm/goqu/pulls{/number}","milestones_url":"https://api.github.com/repos/denisvm/goqu/milestones{/number}","notifications_url":"https://api.github.com/repos/denisvm/goqu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/denisvm/goqu/labels{/name}","releases_url":"https://api.github.com/repos/denisvm/goqu/releases{/id}","deployments_url":"https://api.github.com/repos/denisvm/goqu/deployments","created_at":"2016-08-02T02:22:35Z","updated_at":"2016-08-02T02:22:36Z","pushed_at":"2016-08-02T15:37:22Z","git_url":"git://github.com/denisvm/goqu.git","ssh_url":"git@github.com:denisvm/goqu.git","clone_url":"https://github.com/denisvm/goqu.git","svn_url":"https://github.com/denisvm/goqu","homepage":"http://godoc.org/github.com/doug-martin/goqu","size":372,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"doug-martin:master","ref":"master","sha":"a96f4ed891522b2695d7512918bfecf6431d9246","user":{"login":"doug-martin","id":361261,"avatar_url":"https://avatars.githubusercontent.com/u/361261?v=3","gravatar_id":"","url":"https://api.github.com/users/doug-martin","html_url":"https://github.com/doug-martin","followers_url":"https://api.github.com/users/doug-martin/followers","following_url":"https://api.github.com/users/doug-martin/following{/other_user}","gists_url":"https://api.github.com/users/doug-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/doug-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doug-martin/subscriptions","organizations_url":"https://api.github.com/users/doug-martin/orgs","repos_url":"https://api.github.com/users/doug-martin/repos","events_url":"https://api.github.com/users/doug-martin/events{/privacy}","received_events_url":"https://api.github.com/users/doug-martin/received_events","type":"User","site_admin":false},"repo":{"id":31097246,"name":"goqu","full_name":"doug-martin/goqu","owner":{"login":"doug-martin","id":361261,"avatar_url":"https://avatars.githubusercontent.com/u/361261?v=3","gravatar_id":"","url":"https://api.github.com/users/doug-martin","html_url":"https://github.com/doug-martin","followers_url":"https://api.github.com/users/doug-martin/followers","following_url":"https://api.github.com/users/doug-martin/following{/other_user}","gists_url":"https://api.github.com/users/doug-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/doug-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doug-martin/subscriptions","organizations_url":"https://api.github.com/users/doug-martin/orgs","repos_url":"https://api.github.com/users/doug-martin/repos","events_url":"https://api.github.com/users/doug-martin/events{/privacy}","received_events_url":"https://api.github.com/users/doug-martin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/doug-martin/goqu","description":"SQL builder and query library for golang","fork":false,"url":"https://api.github.com/repos/doug-martin/goqu","forks_url":"https://api.github.com/repos/doug-martin/goqu/forks","keys_url":"https://api.github.com/repos/doug-martin/goqu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doug-martin/goqu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doug-martin/goqu/teams","hooks_url":"https://api.github.com/repos/doug-martin/goqu/hooks","issue_events_url":"https://api.github.com/repos/doug-martin/goqu/issues/events{/number}","events_url":"https://api.github.com/repos/doug-martin/goqu/events","assignees_url":"https://api.github.com/repos/doug-martin/goqu/assignees{/user}","branches_url":"https://api.github.com/repos/doug-martin/goqu/branches{/branch}","tags_url":"https://api.github.com/repos/doug-martin/goqu/tags","blobs_url":"https://api.github.com/repos/doug-martin/goqu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doug-martin/goqu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doug-martin/goqu/git/refs{/sha}","trees_url":"https://api.github.com/repos/doug-martin/goqu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doug-martin/goqu/statuses/{sha}","languages_url":"https://api.github.com/repos/doug-martin/goqu/languages","stargazers_url":"https://api.github.com/repos/doug-martin/goqu/stargazers","contributors_url":"https://api.github.com/repos/doug-martin/goqu/contributors","subscribers_url":"https://api.github.com/repos/doug-martin/goqu/subscribers","subscription_url":"https://api.github.com/repos/doug-martin/goqu/subscription","commits_url":"https://api.github.com/repos/doug-martin/goqu/commits{/sha}","git_commits_url":"https://api.github.com/repos/doug-martin/goqu/git/commits{/sha}","comments_url":"https://api.github.com/repos/doug-martin/goqu/comments{/number}","issue_comment_url":"https://api.github.com/repos/doug-martin/goqu/issues/comments{/number}","contents_url":"https://api.github.com/repos/doug-martin/goqu/contents/{+path}","compare_url":"https://api.github.com/repos/doug-martin/goqu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doug-martin/goqu/merges","archive_url":"https://api.github.com/repos/doug-martin/goqu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doug-martin/goqu/downloads","issues_url":"https://api.github.com/repos/doug-martin/goqu/issues{/number}","pulls_url":"https://api.github.com/repos/doug-martin/goqu/pulls{/number}","milestones_url":"https://api.github.com/repos/doug-martin/goqu/milestones{/number}","notifications_url":"https://api.github.com/repos/doug-martin/goqu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doug-martin/goqu/labels{/name}","releases_url":"https://api.github.com/repos/doug-martin/goqu/releases{/id}","deployments_url":"https://api.github.com/repos/doug-martin/goqu/deployments","created_at":"2015-02-21T01:06:00Z","updated_at":"2016-07-25T06:00:33Z","pushed_at":"2016-08-02T15:37:22Z","git_url":"git://github.com/doug-martin/goqu.git","ssh_url":"git@github.com:doug-martin/goqu.git","clone_url":"https://github.com/doug-martin/goqu.git","svn_url":"https://github.com/doug-martin/goqu","homepage":"http://godoc.org/github.com/doug-martin/goqu","size":372,"stargazers_count":263,"watchers_count":263,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":20,"mirror_url":null,"open_issues_count":7,"forks":20,"open_issues":7,"watchers":263,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doug-martin/goqu/pulls/25"},"html":{"href":"https://github.com/doug-martin/goqu/pull/25"},"issue":{"href":"https://api.github.com/repos/doug-martin/goqu/issues/25"},"comments":{"href":"https://api.github.com/repos/doug-martin/goqu/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/doug-martin/goqu/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/doug-martin/goqu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doug-martin/goqu/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/doug-martin/goqu/statuses/7d421decfe96a17af5de12b60b5ff0cd49669215"}}}}
{"actor":{"display_login":"doug-martin"}}