Releases: kidoz/dotrocks
Release list
DotRocks 1.4.2
A patch release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. This release fixes a StarRocks session leak in the experimental DotRocks.FlightSql transport — every RPC re-authenticated, so each query left sleeping frontend connections behind until the per-user connection limit was exhausted — and corrects several ADO.NET contracts in that transport. The core driver gains the standard large-value accessors and a cheaper result-row loop.
Added
- A "Reading large results" guide documents how result sets stream, what bounds memory and time while reading, how to choose between the MySQL protocol and Arrow Flight SQL, and the capabilities DotRocks deliberately does not expose because StarRocks does not provide them — there is no fetch size or server-side cursor (StarRocks does not implement
COM_STMT_FETCH) and no parallel Flight endpoint fan-out (StarRocks returns a single endpoint per query). DotRocksDataReaderimplementsGetStreamandGetTextReader, so code written against the standard ADO.NET large-value accessors works without falling back to the base implementations. Both read from the already-materialized field value (a NULL yields an empty stream/reader); the reader's memory guarantee remains per row, not per field, and that is now stated on the type along with the fact thatCommandBehavior.SequentialAccessis accepted but imposes no restrictions and yields no additional memory benefit.- The read path's per-row cost is now guarded by the performance budget. A server-free
MaterializeRowsbenchmark drives rows through the typedDotRocksDataReaderaccessors (measured at ~478 bytes per row for a three-column row) with a tight allocation ceiling, and the budgeted benchmark suite runs in CI, so a regression in per-row buffering or boxing fails the build instead of going unnoticed. The live large-result test now also bounds allocation per row across the whole 100k-row drain and asserts the reader retains nothing afterwards. DotRocksFlightSqlDataSource.CreateConnectionhands out ADO.NET connections that share the data source's channels and authenticated sessions, so short-lived connections no longer each build a private channel and session. The data source also implementsIAsyncDisposable, which is the preferred way to dispose it because releasing server sessions is a network operation.DotRocksFlightSqlTransaction.IsCompletedreports whether the server confirmed completion.
Changed
- The result-row loop reads each row into a buffer rented from
ArrayPooland returns it once the row is decoded, instead of allocating a fresh array per row. Measured on the budgeted benchmark, per-row allocation drops from about 478 to 425 bytes for a narrow three-column row, and the saving grows with row width. This is safe because every decoded value copies out of the payload; a regression test poisons a recycled buffer to prove no materialized value aliases it. A row spanning continuation packets (a value larger than one 16 MB packet) still uses an exact-size array, since its length is not known until reassembly completes. GetOrdinaluses a lookup built once per result set rather than scanning the column list on every call, so reading columns by name inside a row loop is no longer O(columns) per access. The typed accessors (GetInt32,GetInt64,GetDouble, and friends) now test the boxed value directly before falling back toConvert.- The Flight SQL benchmarks establish their connections once in setup rather than per iteration, and the direct record-batch benchmark now projects and consumes the same columns as the row benchmarks, so the comparison measures row materialization rather than a smaller projection plus per-iteration connection setup.
Fixed
- Arrow Flight SQL no longer leaks a StarRocks session per RPC. The transport sent Basic credentials on every call, and StarRocks creates a frontend session for each authenticated call, so a single query left two sleeping sessions behind and a benchmark run reached the 1024-connection user limit (
ResourceExhausted). The credentials are now exchanged once during the Flight handshake for the session bearer token that every later call reuses, and disposal releases the session with the Flight SQLCloseSessionaction. Measured against StarRocks 4.0.7: five queries created eleven sessions before the fix and none after it. Servers that do not implement the handshake keep the previous per-call behavior, and servers without theCloseSessionaction (StarRocks 3.5) hold one session per data source until it expires instead of one per call. - A Flight SQL transaction is marked completed only after the server confirms completion, so a failed
CommitAsyncorRollbackAsyncleaves it active and recoverable instead of stranding an open server transaction that the client can neither retry nor roll back. A failed rollback during disposal now also releases the connection, which previously stayed bound to a transaction that could no longer be completed. - Flight SQL decimals report the type they actually materialize. Columns declared with more precision than
System.Decimalcan hold (DECIMAL(38, s)is routine in StarRocks) are typed asDotRocksDecimal, andGetDecimal/GetFieldValue<decimal>convert such values when they are representable instead of failing with anInvalidCastExceptionfromConvert.ChangeType. - Cancelling a Flight SQL command raises
OperationCanceledExceptionrather than a rawRpcException, so consumers can tell cancellation from a transport failure.Cancel()no longer races with the end of execution, and no longer misses a cancellation issued in the instant after execution starts. DbDataReader.HasRowsreports the real result. StarRocks does not declare a record count, and the Flight reader previously answeredtruefor every such result, including empty ones; a command now fetches the first batch before returning the reader.GetOrdinaland ordinal-based accessors on the Flight reader report unknown columns withIndexOutOfRangeExceptionas ADO.NET specifies, instead ofArgumentOutOfRangeException.- Reading a large Flight SQL value in chunks through
GetBytes/GetCharsno longer re-materializes the whole value for every chunk; the materialized value is cached for the current row and column, so allocation is proportional to the value rather than to value size times chunk count. - A Flight endpoint that advertises several locations no longer fails when the first one is untrusted or unreachable: the trusted alternatives are tried in the order the server supplied them.
- A result value larger than the reader's maximum logical packet size now reports that limit instead of "StarRocks returned malformed protocol bytes", which sent callers looking for a protocol bug when the real cause was an oversized field.
Compatibility
- .NET 10 / C# 14. Source- and binary-compatible with 1.4.1 — the public surface only gains members (
DotRocksDataReader.GetStream/GetTextReader,DotRocksFlightSqlDataSource.CreateConnection/DisposeAsync,DotRocksFlightSqlTransaction.IsCompleted).DotRocks.Data,DotRocks.EntityFrameworkCore, and the analyzers behave as in 1.4.1 apart from those additions and the internal row-buffer change. - Behavior changes in the experimental
DotRocks.FlightSqltransport worth noting:ExecuteReaderAsyncnow fetches the first record batch before returning, so it waits for the server to start producing andHasRowsreflects the real result; cancellation surfaces asOperationCanceledExceptioninstead ofRpcException; a missing column throwsIndexOutOfRangeException;DECIMALcolumns wider thanSystem.Decimalmaterialize asDotRocksDecimalandGetDecimalthrowsDotRocksPrecisionLossExceptionwhen a value genuinely does not fit; and a commit or rollback the server rejects leaves the transaction active rather than completed. Preferawait usingoverusingforDotRocksFlightSqlDataSource, since releasing the server session is a network call. The package surface remains experimental.
Full Changelog: v1.4.1...v1.4.2
DotRocks 1.4.1
A patch release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. This release fixes a hang: reading rows from a DbDataReader was not covered by CommandTimeout or Cancel(), so a server that stopped sending mid-result left the caller waiting indefinitely.
Fixed
CommandTimeoutandDbCommand.Cancel()now apply while aDbDataReaderiterates rows. The command's cancellation scope previously ended when the reader was handed back, so a server that stopped sending mid-result leftRead/ReadAsyncwaiting indefinitely — with no timeout and no way to cancel — on both the synchronous and asynchronous paths. The reader now owns the scope and re-arms the timeout around each row fetch, so a stalled fetch fails with a timeout while a legitimately long streaming scan is not capped by one total budget. A timed-out or cancelled read retires the connection instead of returning it to the pool.- Disposing a reader over a partially consumed result set no longer drains the remaining rows uninterruptibly. The courtesy drain that keeps a connection poolable is now bounded by the command timeout; on expiry the connection is retired rather than blocking the caller for the rest of the stream.
Compatibility
- .NET 10 / C# 14. Source- and binary-compatible with 1.4.0 — no public API changes. Behavior changes worth noting: a stalled row read now fails with a
DotRocksExceptionwhose message reports a timeout (previously it blocked forever), and abandoning a reader over a large unread result set now retires the connection instead of draining the remainder. Long-running streaming scans are unaffected: the timeout bounds each individual row fetch, not the reader's total lifetime.CommandTimeout = 0continues to mean "no timeout".
Full Changelog: v1.4.0...v1.4.1
DotRocks 1.4.0
A minor release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. This release introduces the experimental DotRocks.FlightSql package: a separate Arrow Flight SQL transport that streams native Arrow record batches for analytical reads, with async ADO.NET types, EF Core integration, and an explicit, opt-in MySQL-protocol fallback.
Added
- An experimental
DotRocks.FlightSqlpackage provides a separate Arrow Flight SQL transport. It streams nativeApache.Arrow.RecordBatchresults, executes standard Flight SQL statement updates, exposes async ADO.NET reader/command/transaction types, and can drive the existing EF Core provider through itsDbConnectionoverload. Named parameters reuse DotRocks's safe SQL binder. Optional MySQL-protocol fallback is explicit: reads retry only safe discovery failures, while writes are routed before Flight so an ambiguous write is never replayed. Endpoint hosts remain allowlisted before credentials or tickets are forwarded. In-process protocol coverage, live StarRocks 3.5.5/4.0.7 Flight-read and fallback-write integration coverage, and comparative transport benchmarks are included. The standard Flight update path is retained for compatible endpoints; StarRocks 4.0.7 returnsUNIMPLEMENTEDfor statementDoPutin live validation.
Compatibility
- .NET 10 / C# 14. The existing
DotRocks.Data,DotRocks.EntityFrameworkCore, and analyzer packages are unchanged —DotRocks.FlightSqlis a new, optional package and the only one that depends onApache.Arrow/Grpc.Net.Client; the core driver remains dependency-free. The Flight transport is asynchronous-only (synchronous ADO.NET members fail explicitly), plaintextgrpc://endpoints requireAllowInsecureTransport, and MySQL-protocol fallback requires both an explicit fallback mode and a fallback connection string. Treat the package surface as experimental: its public API may change in a minor release while it stabilizes.
Full Changelog: v1.3.5...v1.4.0
DotRocks 1.3.5
A patch release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. This release completes the GREATEST/LEAST work started in 1.3.4 by implementing the EF-standard relational translation hooks, so the params-array EF.Functions.Greatest/Least overloads, Math.Max/Math.Min, and inline-collection Max()/Min() all translate to the native StarRocks functions.
Added
- EF Core: the EF-standard relational
EF.Functions.Greatest/Leastparams-array overloads (any argument count),Math.Max/Math.Min, and inline-collectionMax()/Min()(new[] { a, b, c }.Max()) now translate to the native StarRocksgreatest()/least()functions through the relationalGenerateGreatest/GenerateLeastvisitor hooks, with MySQL NULL semantics (the result is NULL when any argument is NULL) encoded in the nullability annotations. The DotRocks 2–4 argumentEF.Functions.Greatest/Leastoverloads shipped in 1.3.4 remain as compatible sugar.
Compatibility
- .NET 10 / C# 14. Source- and binary-compatible with 1.3.4 — no public API changes; the new translation surface is provider-internal. Queries using
Math.Max/Math.Min, the relational params-arrayEF.Functions.Greatest/Least, or inline-collectionMax()/Min()that previously failed with a translation error now execute on the server. NULL semantics note: StarRocks follows MySQL —greatest()/least()return NULL when any argument is NULL, unlike PostgreSQL and SQL Server, which ignore NULL arguments.
Full Changelog: v1.3.4...v1.3.5
DotRocks 1.3.4
A patch release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. This release closes the EF Core provider gaps surfaced by a production analytics-service migration: native greatest()/least() translation, composite primary keys on writable entities, verified conditional aggregation and interpolated raw-SQL parameterization, and explicit connection-string validation that fails fast on missing, invalid, or misspelled configuration.
Added
- EF Core:
EF.Functions.Greatest(...)andEF.Functions.Least(...)(2–4 arguments) translate to the native StarRocksgreatest()/least()functions. StarRocks follows MySQL NULL semantics — the result is NULL when any argument is NULL, unlike PostgreSQL — which is documented on the API and in the README. - EF Core: composite primary keys are supported on writable entities.
UPDATE/DELETEemit oneWHEREcondition per key column,Find/FindAsyncresolve by the full key, and migrations create multi-column StarRocksPRIMARY KEYtables. The DTR0008 analyzer rule (composite primary keys) is retired and no longer reports; the id is reserved and will not be reused. The shippedEfCompositePrimaryKeyAnalyzertype andCompositePrimaryKeyDiagnosticIdconstant remain as obsolete no-ops for binary compatibility and will be removed in the next major release. - EF Core:
UseStarRocksnow validates the connection string at registration and throws a descriptive configuration error for a missing/empty or unparsable connection string, instead of surfacing an obscure failure on first context use. - EF Core: verified and pinned test coverage for the EF-standard interpolated raw-SQL overloads (
FromSql($"..."),Database.SqlQuery<T>($"...")) with automatic parameterization, and for conditional aggregation (Sum(x => cond ? value : null)→SUM(CASE WHEN ...),??→COALESCE,Math.Abs→abs) in a single round trip.
Changed
- Connection strings now fail explicitly on unrecognized keywords (
Connection string keyword '...' is not supported.). Previously an unknown keyword was silently ignored and its option fell back to the default — for a misspelled security keyword such asSsl Mdoe=Requiredthat failed open by leavingSsl ModeatPreferredwith plaintext fallback. AffectsDotRocksConnection,DotRocksConnectionStringBuilder, andUseStarRocksregistration.
Compatibility
- .NET 10 / C# 14. Source-compatible with 1.3.3 — the public API additions are the
EF.Functions.Greatest/Leastextension methods;EfCompositePrimaryKeyAnalyzerandCompositePrimaryKeyDiagnosticIdare now[Obsolete]no-ops. Behavior changes worth noting: unknown connection-string keywords are rejected instead of silently ignored,UseStarRocksvalidates the connection string at registration, and composite-key entity models now pass model validation instead of throwingNotSupportedException.
Full Changelog: v1.3.3...v1.3.4
DotRocks 1.3.3
A patch release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. This release gives the ADO.NET synchronous command path a native streaming pipeline so it no longer blocks on the async path, adds compilable TLS, pooling, transaction, and Stream Load transaction samples, expands the performance benchmark suite, refreshes the documentation, and pins the transitive Roslyn workspace packages.
Added
- The ADO.NET synchronous command path (
ExecuteReader,ExecuteScalar,ExecuteNonQuery, and theCommandBehavioroverloads) now runs on a native synchronous streaming pipeline instead of blocking on the async path throughGetAwaiter().GetResult(), so large result sets stream row-by-row without buffering the whole set or pinning a thread-pool thread on an async continuation.DotRocksDataReadergains aDisposeAsync()override, andExecuteScalar/ExecuteScalarAsyncnow request a single row instead of draining the rest of the result set. - Compilable samples for secure (TLS) connections, connection pooling, transactions, and Stream Load transactions (
DotRocks.Samples.SecureConnection,.ConnectionPooling,.Transactions, and.StreamLoadTransaction). - Expanded performance benchmark coverage — analyzer execution, EF Core materialization, protocol hot paths, packet framing, and Stream Load — with a broadened performance-budget guard.
Changed
- Documentation refresh: new connection-string, security, Stream Load, observability, and analyzer guides; corrected Stream Load result and transaction guidance; documented the bounded metric tags and the canonical EF Core mapping APIs; and clarified analyzer code-fix availability.
Fixed
- The transitive Roslyn workspace packages are pinned so the analyzer projects can no longer pick up a conflicting
Microsoft.CodeAnalysis.*transitive dependency version.
Compatibility
- .NET 10 / C# 14. Source-compatible with 1.3.2 — the only public API addition is the
DotRocksDataReader.DisposeAsync()override. Behavior change worth noting:ExecuteScalar/ExecuteScalarAsyncnow stop after the first row instead of draining the full result set, and the synchronous command path streams rather than blocking on the async pipeline.
Full Changelog: v1.3.2...v1.3.3
DotRocks 1.3.2
A patch release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. This release comes from a focused security review of the driver: it hardens Stream Load against SSRF and DNS rebinding, makes connection-string validation fail closed instead of silently downgrading, stops session state leaking across pooled leases, bounds pool growth, and turns a malformed-TIME parser crash into a controlled protocol error.
Fixed
- A binary
TIMEvalue whose components overflowTimeSpannow surfaces as a controlled malformed-packet error instead of an uncaughtOverflowException. - Dormant connection pools (no idle connections and no outstanding leases) are reaped from the process-wide registry so connection strings that vary per request no longer accumulate pool objects and their eviction timers; reaping is coordinated with lease admission.
Security
- Stream Load redirects are vetted at connect time: the request host is resolved once and the socket connects to exactly that vetted address, refusing loopback, link-local (including the
169.254.169.254and IPv6fd00:ec2::254cloud-metadata endpoints), multicast, unspecified, and IPv6 unique-local targets unless the configured endpoint is itself loopback. This closes an SSRF / credential-forwarding and DNS-rebinding gap and fails closed on resolution failure; the configured endpoint host is trusted and exempt, so only server-chosen redirect hosts are vetted. - Unrecognized
Ssl Modevalues — including out-of-range numeric strings and undefined typed-enum values set through the connection-string builder — now fail closed instead of silently negotiating a plaintext connection. - Session state mutated by a prepared statement (for example
SET @tenant := ?or aSELECT ... := ...user-variable assignment) is no longer reused across leases of a pooled connection. Maximum Pool Sizeis bounded (rejected at both the connection-string builder setter and parse) to resist resource exhaustion from an oversized pool.
Compatibility
- .NET 10 / C# 14. Source-compatible with 1.3.1 — no public API surface changes. Behavior changes worth noting: an unrecognized
Ssl Mode, an oversizedMaximum Pool Size, and a Stream Load redirect to an internal/loopback address now fail fast instead of silently proceeding.
Full Changelog: v1.3.1...v1.3.2
DotRocks 1.3.1
A patch release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. This release consolidates the EF Core table-shape handling behind a single shared annotation registry, fixes migrations that silently dropped StarRocks-specific table options, tightens model validation, and lands a broad internal consolidation of the driver and protocol test infrastructure with no change to observable behavior.
Added
- Canonical table-shape fluent names
HasStarRocksRandomDistribution(buckets)andHasStarRocksSortKey(columns), so every StarRocks table option shares theHasStarRocksprefix.DistributedRandomlyandHasSortKeyremain as forwarding equivalents, and the design-time scaffolder now emits the canonical names. DotRocksJsonvalues can now be bound as command parameters on both the text protocol (escaped string literal) and the binary prepared protocol; previously both paths threwNotSupportedException.
Changed
- Table-shape annotations (key model, distribution, sort key, buckets, replication, properties) are now driven by one internal registry shared by the relational annotation provider, the model validator, the migrations SQL generator, and the design-time code generator, with a completeness test so a new option cannot be wired partially.
- Model validation reports invalid table-shape configuration earlier and more precisely: sort-key columns must map to store columns, wrong-typed annotation values are rejected at model finalization instead of during SQL generation, and shared-table conflict checks now cover random distribution, sort keys, and table properties.
- Extensive internal consolidation with no behavior change: the driver's four command paths share one packet-exchange and exception-translation helper, text and binary result-set parsing share one reader, the parameter-binder lexer twins are unified, and the protocol test suites share one fake server and packet factory.
Fixed
- Migrations generated by the model differ no longer silently drop
DISTRIBUTED BY RANDOM,ORDER BYsort keys, and customPROPERTIES: the relational annotation provider now forwards those annotations into diffedCreateTableOperations. - Equivalent table
PROPERTIESdictionaries on entities sharing a table no longer report a false conflict (comparison is now by content, not reference). ObjectDisposedExceptionduring statement prepare or prepared execution is wrapped as a transientDotRocksExceptionlike every other command path instead of escaping raw.- Integration readiness probes (local
just starrocks-upand CI) now verify a backend acceptsCREATE TABLEbefore tests start; previously suites could launch while only the StarRocks frontend was up and fail spuriously.
Compatibility
- .NET 10 / C# 14. Source-compatible with 1.3.0. The only public API additions are the
HasStarRocksRandomDistribution/HasStarRocksSortKeyfluent names (the priorDistributedRandomly/HasSortKeynames still work) andDotRocksJsonparameter binding. Existing valid code is otherwise unaffected beyond the bug fixes above; migrations regenerated against this version now correctly retain random distribution, sort keys, and customPROPERTIES.
Full Changelog: v1.3.0...v1.3.1
DotRocks 1.3.0
A minor release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. This release comes from a deep correctness and security review of the whole stack: it hardens the driver's connection lifecycle and protocol edge cases, closes literal-escaping gaps in the EF Core provider, and tightens the release pipeline, which now gates publishing on the StarRocks 3.5.5 and 4.0.7 integration matrix.
Added
DotRocksStreamLoadException.ResponseBodycarries the raw server response body on Stream Load HTTP failures, so diagnostic detail (auth, label, and format errors) is no longer discarded. The exception message itself still never embeds untrusted server text.
Changed
DotRocks.Analyzers.CodeFixesnow declares a NuGet dependency onDotRocks.Analyzers, so installing the code-fix package alone no longer yields a code-fix assembly whose analyzer dependency cannot load in the IDE.- The release workflow validates the tag format and the matching
CHANGELOG.mdsection, and gates NuGet publishing on the full StarRocks 3.5.5 / 4.0.7 integration matrix; all GitHub Actions are pinned to commit SHAs.
Fixed
- Commands whose payload spans multiple protocol packets (≥ 16 MiB) no longer fail with an out-of-order sequence error: the response reader continues from the writer's final sequence id.
- Disposing a partially-read data reader drains the remaining result set and leaves the connection open and usable instead of closing the logical connection;
CommandBehavior.SingleRowandCommandBehavior.SchemaOnlyare now honored. - A benign server error (for example a SQL typo) no longer closes the logical connection when the session has run
SET/USEor the physical connection has exceeded its lifetime — only genuinely broken connections are closed. - A server error arriving mid result set on the prepared (binary) protocol now surfaces the real server error code and message instead of a malformed-protocol failure, and the connection stays usable.
TIMEvalues beyond theTimeSpan.Parserange (up to MySQL's838:59:59, including negative and fractional values) parse correctly on the text protocol, and binary-protocolYEARvalues box asint, matchingGetFieldType.GetString/GetFieldValue<string>on binary columns throwInvalidCastExceptioninstead of silently returning"System.Byte[]".- Cancellation during
COM_STMT_CLOSEmarks the physical connection broken so a desynchronized connection can never return to the pool, and a pool-creation race no longer leaks the losing pool's idle-eviction timer. - A plain
decimalproperty with precision beyond the native range maps through adecimal↔DotRocksDecimalvalue converter instead of a converter-less mapping with a mismatched CLR type. - Scaffolding round-trips no longer lose table shape: the design-time annotation code generator emits
DistributedRandomly(...)for random distribution (previously a broken zero-column hash-distribution call),HasSortKey(...), andHasStarRocksProperty(...). - The multi-row
SaveChangesanalyzer (DTR0007) only pairs a range operation with aSaveChangescall on the sameDbContextinstance and ignores mutually exclusive branches, removing false positives.
Security
DotRocksDataSource.ConnectionStringreturns the redacted connection string (password omitted), matchingDotRocksConnection.ConnectionString; created connections still authenticate with the original credentials.- Connection-string values containing
;, quotes, or=are serialized with properDbConnectionStringBuilderquoting instead of a backslash escape the parser does not understand, closing an option-injection hole (including a potential TLS downgrade) on the serialize → reparse round-trip. - EF Core string literals and migration
PROPERTIESkeys/values escape backslashes and control characters the same way the driver's literal formatter does, closing a literal-corruption gap for values ending in\; single quotes in table properties are now escaped rather than rejected.
Compatibility
- .NET 10 / C# 14. Source-compatible with 1.2.0; the only public API addition is
DotRocksStreamLoadException.ResponseBody. Behavioral changes to note:DotRocksDataSource.ConnectionStringno longer returns the password, disposing a partially-read reader keeps the connection open,GetStringon binary columns now throws, andDotRocks.Analyzers.CodeFixesnow installsDotRocks.Analyzersas a dependency.
Full Changelog: v1.2.0...v1.3.0
DotRocks 1.2.0
A minor release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. Every feature below is verified end to end against StarRocks 4.0.7.
Added
- Server-side prepared statements via
DotRocksParameterMode.ServerPrepared— the binaryCOM_STMT_PREPARE/COM_STMT_EXECUTE/COM_STMT_CLOSEprotocol with binary parameter encoding and result-row decoding, cached and reused per physical connection. Use positional?placeholders. StarRocks 4.0.7 allows onlySELECTin the prepared protocol, so use the text protocol (Auto) for parameterized DML. DbConnection.GetSchema()metadata collections over StarRocksINFORMATION_SCHEMA:MetaDataCollections,Databases,Tables,Views, andColumns, with restriction filtering.- EF Core query translation for explicit relational joins (
Join,GroupJoin/SelectMany+DefaultIfEmpty, cross joins) andGroupBywithHAVINGpredicates and aggregates, plusDateTime/DateOnlymember andAdd…translators andMathmethod translators mapped to StarRocks functions. - Advanced StarRocks table-model fluent APIs for migrations:
DistributedRandomly(buckets)(DISTRIBUTED BY RANDOM),HasSortKey(columns)(ORDER BY), andHasStarRocksProperty(name, value)(additionalPROPERTIES, validated against quote injection). DotRocksJson, an immutable lossless wrapper for StarRocksJSONvalues (and the text-typedARRAY/MAP/STRUCTprojections), read viareader.GetFieldValue<DotRocksJson>(ordinal).StarRocksServerVersionwithDotRocksDbContextOptionsBuilder.ServerVersion(...), an opt-inDetectAsync(connectionString), and ordering (IComparable<StarRocksServerVersion>plus comparison operators) for version gating such asversion >= new StarRocksServerVersion(3, 5).- Stream Load partition targeting and on-the-fly gzip compression (CSV payloads), plus Stream Load, connection-open, and transaction duration metrics on the
DotRocks.Datameter. - Four driver-usage analyzers —
DTR0009(interpolated/concatenatedCommandText),DTR0010(async call missing an availableCancellationToken),DTR0011(blocking on an async call), andDTR0012(hard-coded connection-string password). - Public API surface tracking via
Microsoft.CodeAnalysis.PublicApiAnalyzerswith package validation, plus protocol and parameter-tokenizer fuzz harnesses, and compilable samples for ADO.NET, dependency injection, Dapper, and Stream Load.
Changed
DotRocksDbContextOptionsBuilderis now a relational options builder bound to theDbContextOptionsBuilder; its previously non-functional public parameterless constructor was removed. Configure the provider only through theUseStarRocks(...)options action.- Reduced per-row and per-call allocations on hot paths with no change to observable behavior: result-value decoding now parses directly from UTF-8 spans, the wire-protocol integer reader/writer uses
BinaryPrimitives, SQL literal escaping fast-paths throughSearchValues, and the EF Core function-lookup tables areFrozenDictionary.
Fixed
Math.Round(value, MidpointRounding)is no longer translated to SQL with the rounding mode mistaken for a digit count; it now falls back to client evaluation like other untranslatable calls.
Security
- The ADO.NET
DbConnection.ConnectionStringgetter no longer returns the password (thePersistSecurityInfo=falseconvention), so logging or echoing it cannot leak the secret. - Binary prepared-statement temporal decoders raise a controlled
MalformedPacketExceptionon out-of-rangeDATETIME/TIMEcomponents instead of an uncontrolled exception.
Compatibility
- .NET 10 / C# 14. Source-compatible with 1.1.x except that the unusable
DotRocksDbContextOptionsBuilder()parameterless constructor was removed — configure the provider throughUseStarRocks(...). New public API (server-side prepared statements,GetSchema, the table-model fluent APIs,DotRocksJson,StarRocksServerVersionordering, and the join/aggregate translators) is additive.
Full Changelog: v1.1.0...v1.2.0