You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9d57ab8
Browse filesBrowse the repository at this point in the historyBrowse files
foreach(varupdateKeyinupdates.Keys)// NOSONAR:S3267 - updates.Keys is tiny; LINQ would add a closure + enumerator alloc per op in the batch-DML hot path
privatevoidDeleteRecordsCore(List<(longstoragePosition,Dictionary<string,object>row)>recordsToDelete)// NOSONAR:S3776 - per-engine physical delete, PK cleanup, key-only hash removal and compaction bookkeeping are distinct but share the batch; extraction would force intermediate lists
2351
2367
{
2352
2368
if(recordsToDelete.Count==0)
2353
2369
return;
@@ -2438,7 +2454,7 @@ public void Delete(string? where)
2438
2454
/// </summary>
2439
2455
publicintDeleteAffected(string?where)
2440
2456
{
2441
-
if(this.isReadOnly)thrownewInvalidOperationException("Cannot delete in readonly mode");
internalstaticintWriteTypedValueToSpan(Span<byte>buffer,objectvalue,DataTypetype)// NOSONAR:S3776 - exhaustive per-DataType binary writer with size guards; splitting would add a dispatch layer on the row-serialization hot path
internalstaticobjectReadTypedValueFromSpan(ReadOnlySpan<byte>buffer,DataTypetype,outintbytesRead)// NOSONAR:S3776 - exhaustive per-DataType binary reader with size guards; splitting would add a dispatch layer on the row-deserialization hot path
privateIEnumerable<StructRow>ScanStructRowsWhereCoreIterator(string?where,boolenableCaching)// NOSONAR:S3776 - ordered fast-path cascade (hash -> PK -> SIMD -> scan); each guard is a separate resolution strategy with early yield-break
195
200
{
196
201
// Fixed-width records: StructRow's variable-length schema can't walk the fixed-width
197
202
// format, so matched records are materialized through the dictionary path. The numeric-SIMD
@@ -247,15 +252,15 @@ private IEnumerable<StructRow> ScanStructRowsWhereCoreIterator(string? where, bo
/// (no deserialization, no boxing). Integer/Long use portable Vector<T>; Real uses
319
324
/// direct per-record reads. Fixed-width tables materialize rows through the dictionary path.
320
325
/// </summary>
321
-
privateIEnumerable<StructRow>ScanByNumericSimd(
326
+
privateIEnumerable<StructRow>ScanByNumericSimd(// NOSONAR - S3776 (SIMD kernel with per-type extraction passes) + S107 (layout parameters intentionally threaded; grouped further would add an allocation in the hot path)
privateboolInitAndMoveNext()// NOSONAR:S3776 - init resolves the WHERE via an ordered fast-path cascade and seeds the phase machine; each branch has distinct cleanup
/// Gets or sets whether this table uses the fixed-width record layout (out-of-line overflow).
267
267
/// Persisted in table metadata so a database created with the flag reopens correctly.
268
268
/// </summary>
269
-
publicboolIsFixedWidthRecords
269
+
publicboolIsFixedWidthRecords// NOSONAR:S2292 - backing field is read/written directly across the Table.* partial files and metadata round-trip; auto-property would not remove the field
/// back to the general regex path. Returns raw literal text (quotes included) so the caller
524
524
/// still converts via <see cref="SqlParser.ParseValue"/>.
525
525
/// </summary>
526
-
privatestaticboolTryScanCanonicalDml(
526
+
privatestaticboolTryScanCanonicalDml(// NOSONAR:S3776 - defensive canonical-shape scanner; each guard rejects a deviation to the regex fallback and must stay sequential to stay allocation-free
527
527
stringsql,
528
528
outstringtable,
529
529
outstringsetCol,
@@ -965,7 +965,7 @@ private bool TryParseDeleteForBatch(string sql, out string tableName, out string
965
965
/// ✅ FIX: Always use outer transaction to prevent concurrent write corruption.
publicvoidExecuteBatchSQL(IEnumerable<string>sqlStatements)// NOSONAR:S3776 - grouped multi-table batch dispatcher (INSERT fast path / UPDATE / DELETE / fallback) under one transaction; extraction would fragment the single-lock contract
Copy file name to clipboardExpand all lines: src/SharpCoreDB/Services/SqlParser.Core.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -296,7 +296,7 @@ public List<Dictionary<string, object>> ExecuteQuery(CachedQueryPlan plan, Dicti
296
296
/// Returns false (falling back to the full parser) for any condition that cannot be
297
297
/// handled with exact parity to the legacy string-based path.
298
298
/// </summary>
299
-
privateboolTryExecuteSimpleSelect(
299
+
privateboolTryExecuteSimpleSelect(// NOSONAR:S3776 - guarded fast-path cascade (indexed point lookup -> legacy WHERE-string fallback); each guard preserves exact parity with the parser and shares the fall-through
0 commit comments