Skip to content

Conversation

jseldess
Copy link
Contributor

@jseldess jseldess commented Sep 22, 2016

This PR completes our docs on SET DATABASE.

Fixes #451
Fixes #495


This change is Reviewable

@jseldess
Copy link
Contributor Author

@mjibson, you'll notice that I simplified the railroad diagram, but I couldn't figure out how to get it down to one main line. Let me know if you have any ideas.

HTML version: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/5c24191ea3348e485c8402f7dcf0704cd4816083/set-database.html

@jseldess
Copy link
Contributor Author

@mjibson, @sploiselle and I figure out the diagram.

@@ -208,6 +208,7 @@ func main() {
{name: "savepoint_stmt", inline: []string{"savepoint_name"}},
{name: "select_stmt", inline: []string{"select_no_parens", "simple_select", "opt_sort_clause", "select_limit"}},
{name: "set_stmt", inline: []string{"set_rest", "set_rest_more", "generic_set"}, exclude: regexp.MustCompile("CHARACTERISTICS"), replace: map[string]string{"'TRANSACTION' transaction_mode_list | ": ""}},
{name: "set_database", stmt: "set_stmt", inline: []string{"set_rest", "set_rest_more", "generic_set"}, exclude: regexp.MustCompile("CHARACTERISTICS"), replace: map[string]string{"var_name": "'DATABASE'", "'DEFAULT'": "var_list", "var_list": "database_name", "'LOCAL'": "", "'SESSION'": "", "'TRANSACTION' transaction_mode_list | ": ""," | 'TIME' 'ZONE' zone_value ": ""},unlink: []string{"database_name"}},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think with a match you can get rid of the optional empty branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjibson, we figured it out using more replacements, but I forgot to update the link. You can see it here: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/dfafce3078cf944c7eb72fe42f9125f24e8691c4/set-database.html

I believe I tried with match and couldn't get it to work. If you have a sec to help out, I'm happy to try again, if you like.

@jseldess jseldess merged commit d7d17b4 into gh-pages Sep 26, 2016
@jseldess jseldess deleted the set-database branch September 26, 2016 18:56
Simran-B pushed a commit to Simran-B/docs that referenced this pull request Aug 21, 2025
* Add Batch API issue to Stream Transaction limitations

* Add known issue for Stream transaction + Batch API

* Re-add remark about transaction size limit of 128 MB for Stream Transactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants