All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
ToSqlText
trait and default implementation for some types. This trait is similar toToSql
frompostgres-types
package. It provide text format encoding whileToSql
are binary by default.
- Updated
DataRowEncoder
encode API with unifiedencode_field
for both binary and text encoding.DataRowEncoder::new
now acceptsArc<Vec<FieldInfo>>
instead of column count. The encoder now has type and format information for each column.encode_field
no longer requiresType
andFieldFormat
. A newencode_field_with_type_and_format
is provided for custom use-case. - Updated
do_describe
API fromExtendedQueryHandler
to include full information about requestedStatement
orPortal
. query_response
function is replaced byQueryResponse::new
- lifetime binding in
on_query
functions if the implementation has its own lifetime specifier
Further improve extended query support. Now the server can respond statement describe correctly.
- Add some docs.
- Add
integer_datetimes
parameter on startup so clients like jdbc will parse time types as integer. DescribeResponse
that contains information for bothParameterDescription
andRowDescription
.
- Update
do_describe
ofExtendedQueryHandler
. Add new bool argumentinference_parameters
to check if parameter types from statement is required to return. - Updated resultset
Response::QueryResponse
lifetime from'static
to portal or query string, this allows reference of portal in stream.
- The default implementation of
ExtendedQueryHandler
now correctly respondsClose
message withCloseComplete
- Correct SCRAM mechanism name in plain connection
This release reverts design to use MakeHandler
in process_socket
, since it
stops shared implementation between StartupHandler
and query handlers.
- Update
process_socket
to acceptStartupHandler
,SimpleQueryHandler
andExtendedQueryHandler
.MakeHandler
should be called upon new socket incoming. Check our updated examples for usage. - Removed
Password
,SASLInitialResponse
andSASLResponse
from frontend message enum to avoid confusion.PasswordMessageFamily
is now an enum that contains all these message forms and a raw form. This is because in postgres protocol, password message can only be decoded into concrete type when there is a context. See our MD5 and SCRAM authenticator for usage.
Fixes compatibility with rust-postgres client's prepared statement
implementation. It sends Parse-Describe-Sync on Client::prepare_typed
.
Parse
andBind
completion response is now fixed- Responding statement describe request with parameter description, and ready for query
- Updated
QueryParser
API to provide parameter types for implementation. - Updated
Portal
API, it now holdsArc
reference to relatedStoredStatement
. - Updated
ExtendedQueryHandler::do_describe
arguments, it now takes a borrowedStoredStatement
. Compared to previews API, parameter types are provided as well. - Renamed
StoredStatement::type_oids()
toparameter_types()
ExtendedQueryHandler
trait now has two new component:PortalStore
andQueryParser
.PortalStore
replaced statement and portal cache onClientInfo
, these data will now be cached withPortalStore
fromExtendedQueryHandler
implementation.- A default
PortalStore
implementation,MemPortalStore
, is provided for most usecase. Statement
API now renamed toStoredStatement
. The new API holds parsed statement fromQueryParser
implementation.Portal
API, like it's statement counterpart, no longer stores statement as string, it shares same statement type withStoredStatement
,QueryParser
andExtendedQueryHandler
.PasswordVerifier
andAuthDB
are now merged intoAuthSource
API. The new API asks developer to fetch password and an optional salt. The password can either be hashed or cleattext, depends on which authentication mechanism is used.
SCRAM-SHA-256-PLUS
authentication is supported when you provide server certificate.do_describe
is added toExtendedQueryHandler
, now it's possible toDescribe
a statement or portal without execution. The implementation is also required to be capable with this.DefaultServerParameterProvider
implementation is provided to include minimal parameters for JDBC and psycopg2 working.PlaceholderExtendedQueryHandler
to simplify example and demo when extended query is not supported.Flush
message added. @penberg