FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Support for multiple-schemas by shlomi-noach · Pull Request #48 · github/ccql · GitHub

This repository was archived by the owner on Feb 21, 2023. It is now read-only.
/ ccql Public archive

Support for multiple-schemas - #48

Merged
shlomi-noach merged 12 commits into
masterfrom
multi-schema-query
Oct 31, 2017
Merged

shlomi-noach merged 12 commits into
masterfrom
multi-schema-query

Conversation

shlomi-noach commented Oct 24, 2017 •
edited
Loading

Copy link
Copy Markdown
Contributor

Based on #45 by @AnshumanTripathi, and with much gratitude, this PR introduces multi-schema support.

It is now possible to query multiple schemas per host.

To maintain backwards compatibility a new flag is added:

  -s string
      List of databases to query from; overrides -d, prints schema name to output
  • When -s is provided, there is no need for -d.
  • When -s is provided, the schema name is listed as 2nd column in output

Example:

$ echo $hosts | ccql -t 0.5 -s test -q "select uuid() from dual" | column -t
host3:3306    test  d0d95311-b8ad-11e7-81e7-008cfa542442
host2:3306    test  d0d95fd6-b8ad-11e7-9a23-008cfa544064
host1:3306    test  d0d96924-b8ad-11e7-9bde-008cfa5440e4
host4:3306    test  d0d99a9d-b8ad-11e7-a680-008cfa542c9e
$ echo $hosts | ccql -t 0.5 -s test,meta -q "select uuid() from dual" | column -t
host3:3306    test  d0d95311-b8ad-11e7-81e7-008cfa542442
host2:3306    meta  d0d95311-b8ad-11e7-a16c-a0369fb3dc94
host2:3306    test  d0d95fd6-b8ad-11e7-9a23-008cfa544064
host1:3306    meta  d0d95311-b8ad-11e7-9a15-a0369fb5fdd0
host3:3306    meta  d0d95311-b8ad-11e7-bd26-a0369fb5f3d8
host4:3306    meta  d0d95311-b8ad-11e7-a16c-a0369fb3dc94
host1:3306    test  d0d96924-b8ad-11e7-9bde-008cfa5440e4
host4:3306    test  d0d99a9d-b8ad-11e7-a680-008cfa542c9e

shlomi-noach deployed to production/github-mysqlutil-ee465bb October 24, 2017 11:29 Active
shlomi-noach deployed to production/github-mysqlutil-ee465bb October 24, 2017 11:31 Active
shlomi-noach deployed to production/github-mysqlutil-ee465bb October 24, 2017 11:35 Active

Copy link
Copy Markdown
Contributor Author

@AnshumanTripathi makes sense?

Copy link
Copy Markdown

👍

shlomi-noach merged commit 0d38dff into master Oct 31, 2017
shlomi-noach deleted the multi-schema-query branch October 31, 2017 05:57

This branch was successfully deployed

1 active deployment
production/github-mysqlutil-ee465bb — 59799c0e Deployed Oct 24, 2017 by shlomi-noach
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL