Conversation
This is the last of the C ABI that was not bound, and none of it is a new thing the engine can do. It is the same calls with less to write around them. A database and a connection are two objects because they are two things, and a program querying from four threads wants one of the first and four of the second. A program that wants exactly one should not have to say so twice, so Connection.open, Connection.create and Connection.memory make the database inside the call and let go of it. Nothing is lost by that: a connection carries its own file handle and a database holds only the path and the configuration. What is given up is the second connection, and duplicate is the way back to one. Settings usually arrive as text, and a program holding a key and a value has no business knowing which of three fields they land in. Config.with takes one by name and Config.of takes a whole map, and both forward to the engine rather than matching the key here, so a key the engine grows later works without a release of this client and a key that never existed is refused with the typo named. Twelve tests. The one worth pointing at is that 512MB is refused rather than read as a number: the two readings of that suffix differ by 4.9%, and the place to decide which one somebody meant is where they typed it.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the last of the C ABI that was not bound from the JVM, and none of it is a new thing the engine can do. It is the same calls with less to write around them.
A database and a connection are two objects because they are two things: the path and the configuration on one side, the caches and the plan cache and the file handle on the other, and a program querying from four threads wants one of the first and four of the second. A program that wants exactly one should not have to say so twice, so
Connection.open,Connection.createandConnection.memorymake the database inside the call and let go of it. Nothing is lost by that, since a connection carries its own file handle and a database holds only the path. What is given up is the second connection, andduplicate()is the way back to one.Settings usually arrive as text, out of a properties file or a connection string or a command line, and a program holding a key and a value has no business knowing which of three fields they land in.
Config.with(key, value)takes one by name andConfig.of(map)takes a whole map, and both forward tozu_config_setrather than matching the key here, so a key the engine grows later works without a release of this client and a key that never existed is refused with the typo named.Twelve tests. The one worth pointing at is that
512MBis refused rather than read as a number: the two readings of that suffix differ by 4.9%, and the place to decide which one somebody meant is where they typed it.Local gate green: 183 tests, no failures.