Skip to content

Releases: kidoz/dotrocks

DotRocks 1.4.2

Choose a tag to compare

@kidoz kidoz released this 01 Aug 11:17

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).
  • DotRocksDataReader implements GetStream and GetTextReader, 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 that CommandBehavior.SequentialAccess is 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 MaterializeRows benchmark drives rows through the typed DotRocksDataReader accessors (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.CreateConnection hands 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 implements IAsyncDisposable, which is the preferred way to dispose it because releasing server sessions is a network operation.
  • DotRocksFlightSqlTransaction.IsCompleted reports whether the server confirmed completion.

Changed

  • The result-row loop reads each row into a buffer rented from ArrayPool and 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.
  • GetOrdinal uses 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 to Convert.
  • 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 SQL CloseSession action. 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 the CloseSession action (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 CommitAsync or RollbackAsync leaves 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.Decimal can hold (DECIMAL(38, s) is routine in StarRocks) are typed as DotRocksDecimal, and GetDecimal/GetFieldValue<decimal> convert such values when they are representable instead of failing with an InvalidCastException from Convert.ChangeType.
  • Cancelling a Flight SQL command raises OperationCanceledException rather than a raw RpcException, 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.HasRows reports the real result. StarRocks does not declare a record count, and the Flight reader previously answered true for every such result, including empty ones; a command now fetches the first batch before returning the reader.
  • GetOrdinal and ordinal-based accessors on the Flight reader report unknown columns with IndexOutOfRangeException as ADO.NET specifies, instead of ArgumentOutOfRangeException.
  • Reading a large Flight SQL value in chunks through GetBytes/GetChars no 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.FlightSql transport worth noting: ExecuteReaderAsync now fetches the first record batch before returning, so it waits for the server to start producing and HasRows reflects the real result; cancellation surfaces as OperationCanceledException instead of RpcException; a missing column throws IndexOutOfRangeException; DECIMAL columns wider than System.Decimal materialize as DotRocksDecimal and GetDecimal throws DotRocksPrecisionLossException when a value genuinely does not fit; and a commit or rollback the server rejects leaves the transaction active rather than completed. Prefer await using over using for DotRocksFlightSqlDataSource, 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

Choose a tag to compare

@kidoz kidoz released this 01 Aug 08:21

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

  • CommandTimeout and DbCommand.Cancel() now apply while a DbDataReader iterates rows. The command's cancellation scope previously ended when the reader was handed back, so a server that stopped sending mid-result left Read/ReadAsync waiting 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 DotRocksException whose 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 = 0 continues to mean "no timeout".

Full Changelog: v1.4.0...v1.4.1

DotRocks 1.4.0

Choose a tag to compare

@kidoz kidoz released this 31 Jul 21:38

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.FlightSql package provides a separate Arrow Flight SQL transport. It streams native Apache.Arrow.RecordBatch results, executes standard Flight SQL statement updates, exposes async ADO.NET reader/command/transaction types, and can drive the existing EF Core provider through its DbConnection overload. 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 returns UNIMPLEMENTED for statement DoPut in live validation.

Compatibility

  • .NET 10 / C# 14. The existing DotRocks.Data, DotRocks.EntityFrameworkCore, and analyzer packages are unchanged — DotRocks.FlightSql is a new, optional package and the only one that depends on Apache.Arrow/Grpc.Net.Client; the core driver remains dependency-free. The Flight transport is asynchronous-only (synchronous ADO.NET members fail explicitly), plaintext grpc:// endpoints require AllowInsecureTransport, 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

Choose a tag to compare

@kidoz kidoz released this 31 Jul 18:59

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/Least params-array overloads (any argument count), Math.Max/Math.Min, and inline-collection Max()/Min() (new[] { a, b, c }.Max()) now translate to the native StarRocks greatest()/least() functions through the relational GenerateGreatest/GenerateLeast visitor hooks, with MySQL NULL semantics (the result is NULL when any argument is NULL) encoded in the nullability annotations. The DotRocks 2–4 argument EF.Functions.Greatest/Least overloads 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-array EF.Functions.Greatest/Least, or inline-collection Max()/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

Choose a tag to compare

@kidoz kidoz released this 31 Jul 18:38

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(...) and EF.Functions.Least(...) (2–4 arguments) translate to the native StarRocks greatest()/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/DELETE emit one WHERE condition per key column, Find/FindAsync resolve by the full key, and migrations create multi-column StarRocks PRIMARY KEY tables. The DTR0008 analyzer rule (composite primary keys) is retired and no longer reports; the id is reserved and will not be reused. The shipped EfCompositePrimaryKeyAnalyzer type and CompositePrimaryKeyDiagnosticId constant remain as obsolete no-ops for binary compatibility and will be removed in the next major release.
  • EF Core: UseStarRocks now 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.Absabs) 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 as Ssl Mdoe=Required that failed open by leaving Ssl Mode at Preferred with plaintext fallback. Affects DotRocksConnection, DotRocksConnectionStringBuilder, and UseStarRocks registration.

Compatibility

  • .NET 10 / C# 14. Source-compatible with 1.3.3 — the public API additions are the EF.Functions.Greatest/Least extension methods; EfCompositePrimaryKeyAnalyzer and CompositePrimaryKeyDiagnosticId are now [Obsolete] no-ops. Behavior changes worth noting: unknown connection-string keywords are rejected instead of silently ignored, UseStarRocks validates the connection string at registration, and composite-key entity models now pass model validation instead of throwing NotSupportedException.

Full Changelog: v1.3.3...v1.3.4

DotRocks 1.3.3

Choose a tag to compare

@kidoz kidoz released this 13 Jul 07:28

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 the CommandBehavior overloads) now runs on a native synchronous streaming pipeline instead of blocking on the async path through GetAwaiter().GetResult(), so large result sets stream row-by-row without buffering the whole set or pinning a thread-pool thread on an async continuation. DotRocksDataReader gains a DisposeAsync() override, and ExecuteScalar / ExecuteScalarAsync now 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 / ExecuteScalarAsync now 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

Choose a tag to compare

@kidoz kidoz released this 08 Jul 18:20

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 TIME value whose components overflow TimeSpan now surfaces as a controlled malformed-packet error instead of an uncaught OverflowException.
  • 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.254 and IPv6 fd00:ec2::254 cloud-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 Mode values — 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 a SELECT ... := ... user-variable assignment) is no longer reused across leases of a pooled connection.
  • Maximum Pool Size is 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 oversized Maximum 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

Choose a tag to compare

@kidoz kidoz released this 05 Jul 22:38

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) and HasStarRocksSortKey(columns), so every StarRocks table option shares the HasStarRocks prefix. DistributedRandomly and HasSortKey remain as forwarding equivalents, and the design-time scaffolder now emits the canonical names.
  • DotRocksJson values can now be bound as command parameters on both the text protocol (escaped string literal) and the binary prepared protocol; previously both paths threw NotSupportedException.

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 BY sort keys, and custom PROPERTIES: the relational annotation provider now forwards those annotations into diffed CreateTableOperations.
  • Equivalent table PROPERTIES dictionaries on entities sharing a table no longer report a false conflict (comparison is now by content, not reference).
  • ObjectDisposedException during statement prepare or prepared execution is wrapped as a transient DotRocksException like every other command path instead of escaping raw.
  • Integration readiness probes (local just starrocks-up and CI) now verify a backend accepts CREATE TABLE before 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 / HasStarRocksSortKey fluent names (the prior DistributedRandomly / HasSortKey names still work) and DotRocksJson parameter 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 custom PROPERTIES.

Full Changelog: v1.3.0...v1.3.1

DotRocks 1.3.0

Choose a tag to compare

@kidoz kidoz released this 01 Jul 22:11

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.ResponseBody carries 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.CodeFixes now declares a NuGet dependency on DotRocks.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.md section, 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.SingleRow and CommandBehavior.SchemaOnly are now honored.
  • A benign server error (for example a SQL typo) no longer closes the logical connection when the session has run SET / USE or 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.
  • TIME values beyond the TimeSpan.Parse range (up to MySQL's 838:59:59, including negative and fractional values) parse correctly on the text protocol, and binary-protocol YEAR values box as int, matching GetFieldType.
  • GetString / GetFieldValue<string> on binary columns throw InvalidCastException instead of silently returning "System.Byte[]".
  • Cancellation during COM_STMT_CLOSE marks 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 decimal property with precision beyond the native range maps through a decimalDotRocksDecimal value 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(...), and HasStarRocksProperty(...).
  • The multi-row SaveChanges analyzer (DTR0007) only pairs a range operation with a SaveChanges call on the same DbContext instance and ignores mutually exclusive branches, removing false positives.

Security

  • DotRocksDataSource.ConnectionString returns the redacted connection string (password omitted), matching DotRocksConnection.ConnectionString; created connections still authenticate with the original credentials.
  • Connection-string values containing ;, quotes, or = are serialized with proper DbConnectionStringBuilder quoting 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 PROPERTIES keys/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.ConnectionString no longer returns the password, disposing a partially-read reader keeps the connection open, GetString on binary columns now throws, and DotRocks.Analyzers.CodeFixes now installs DotRocks.Analyzers as a dependency.

Full Changelog: v1.2.0...v1.3.0

DotRocks 1.2.0

Choose a tag to compare

@kidoz kidoz released this 25 Jun 21:06

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 binary COM_STMT_PREPARE / COM_STMT_EXECUTE / COM_STMT_CLOSE protocol with binary parameter encoding and result-row decoding, cached and reused per physical connection. Use positional ? placeholders. StarRocks 4.0.7 allows only SELECT in the prepared protocol, so use the text protocol (Auto) for parameterized DML.
  • DbConnection.GetSchema() metadata collections over StarRocks INFORMATION_SCHEMA: MetaDataCollections, Databases, Tables, Views, and Columns, with restriction filtering.
  • EF Core query translation for explicit relational joins (Join, GroupJoin / SelectMany + DefaultIfEmpty, cross joins) and GroupBy with HAVING predicates and aggregates, plus DateTime / DateOnly member and Add… translators and Math method translators mapped to StarRocks functions.
  • Advanced StarRocks table-model fluent APIs for migrations: DistributedRandomly(buckets) (DISTRIBUTED BY RANDOM), HasSortKey(columns) (ORDER BY), and HasStarRocksProperty(name, value) (additional PROPERTIES, validated against quote injection).
  • DotRocksJson, an immutable lossless wrapper for StarRocks JSON values (and the text-typed ARRAY / MAP / STRUCT projections), read via reader.GetFieldValue<DotRocksJson>(ordinal).
  • StarRocksServerVersion with DotRocksDbContextOptionsBuilder.ServerVersion(...), an opt-in DetectAsync(connectionString), and ordering (IComparable<StarRocksServerVersion> plus comparison operators) for version gating such as version >= 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.Data meter.
  • Four driver-usage analyzers — DTR0009 (interpolated/concatenated CommandText), DTR0010 (async call missing an available CancellationToken), DTR0011 (blocking on an async call), and DTR0012 (hard-coded connection-string password).
  • Public API surface tracking via Microsoft.CodeAnalysis.PublicApiAnalyzers with package validation, plus protocol and parameter-tokenizer fuzz harnesses, and compilable samples for ADO.NET, dependency injection, Dapper, and Stream Load.

Changed

  • DotRocksDbContextOptionsBuilder is now a relational options builder bound to the DbContextOptionsBuilder; its previously non-functional public parameterless constructor was removed. Configure the provider only through the UseStarRocks(...) 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 through SearchValues, and the EF Core function-lookup tables are FrozenDictionary.

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.ConnectionString getter no longer returns the password (the PersistSecurityInfo=false convention), so logging or echoing it cannot leak the secret.
  • Binary prepared-statement temporal decoders raise a controlled MalformedPacketException on out-of-range DATETIME / TIME components 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 through UseStarRocks(...). New public API (server-side prepared statements, GetSchema, the table-model fluent APIs, DotRocksJson, StarRocksServerVersion ordering, and the join/aggregate translators) is additive.

Full Changelog: v1.1.0...v1.2.0