Replies: 5 comments 1 reply
-
This doesn't discuss Sync and Flush. Do we get rid of Flush? |
Beta Was this translation helpful? Give feedback.
-
Request ids are needed not just for multiplexing. They are useful to get rid of "Sync dance" for multiple-message exchanges (such as Execute->Data->Error) |
Beta Was this translation helpful? Give feedback.
-
I also propose renaming
The This is purely documentational, though. |
Beta Was this translation helpful? Give feedback.
-
It's not clear when this descriptor can be updated. For example, when schema is migrated (in a different connection) this descriptor has to be updated. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Prepare
andExecute
have thename
field. This was inherited from the Postgres protocol, however we never actually allowed to create named prepared statements. With our move to making all connections as stateless as possible, it is now clear that we'll never want to support named prepared statements.OptimisticExecute
message doesn't have thename
field.DescribeStatement
messagePrepareComplete
message.DescribeStatement
message adds a lot of complexity for client implementations only for the sake of saving miniscule network traffic.DescribeStatement
in its current design is uninplementable.edgedb-js
)Execute
messageDescribe
message. With no named or anonymous prepared statements the current design orExecute
doesn't make any sense.OptimisticExecute
message provides the full functionality ofExecute
.OptimisticExecute
toExecute
type
will continue to beb'O'
.Prepare
toParse
in docs.OptimisticExecute
and other messages to function.Parse
andExecute
to accept "scripts" -- strings with multiple EdgeQL commands in them.Parse
andExecute
will require theexpected_cardinality
field to be set toNO_RESULT
for scripts.Execute
would require the "output type desc ID" to be set to NULL codec.Parse
andExecute
will have to be updated to normalize the arguments and re-pack them into arguments streams that Postgres can work with.Execute
will pipeline all queries in one "implicit transaction" in Postgres.ExecuteScript
message.Parse
andExecute
being able to execute scripts there's no need to theExecuteScript
message.ParameterStatus
message containing the full type descriptor of the state. The type descriptor will include the types of all session config values, all globals, and other session state.InputShape
.InputShape
will be conceptually similar toObjectShapeDescriptor
but will allow sparse encoding of data -- e.g. out of 10 described global variables, the client would be able to encode and send just 1 (or none).Parse
andExecute
messages. The server can return updated state via theExecuteCompleted
message or viaParameterStatus
.Parse
,Execute
, andExecuteComplete
.client.withGlobals()
andclient.withConfig()
APIs. Reusing type-descriptors to encode and decode state values eliminates hardcode and allows to reuse the existing codecs code.OptimisticExecute
:output_typedesc_id
field and "empty tuple" type ID forinput_typedesc_id
OptimisticExecute
would return a special message containing the full output type descriptor BEFORE theData
messages.OptimisticExecute
for queries that don't have arguments withoutParse
. Queries that have all arguments marked as "optional" should also be executable with no arguments and empty tuple input ID.ExecuteMany
messageCOPY IN
alternative.Parse
,Execute
,Data
, etc.Data
messages sent by Postgres (currently they're just forwarded to the client untouched). While the performance impact will likely be negligible, it will still be there.Beta Was this translation helpful? Give feedback.
All reactions