Skip to content

Enhance binary data handling and update neo-client dependency#408

Merged
OutOfBedlam merged 8 commits into
mainfrom
wip-bindata
May 15, 2026
Merged

Enhance binary data handling and update neo-client dependency#408
OutOfBedlam merged 8 commits into
mainfrom
wip-bindata

Conversation

@OutOfBedlam
Copy link
Copy Markdown
Contributor

This pull request introduces a unified and configurable approach to binary data formatting across table, CSV, and JSON exporters, along with improvements to append worker management. The main changes include the addition of a binaryformat option for table and CSV outputs, the refactoring of binary formatting logic to use a shared BinaryFormatter utility, and the implementation of a more robust mechanism for stopping append workers by table name. Several tests have been added or updated to ensure these new features work as expected.

Binary formatting improvements:

  • Added a binaryformat option (supports base64, hex, bytes, preview) to table (jsh/lib/pretty/box.go, jsh/lib/pretty/pretty.js) and CSV exporters, allowing users to control how binary data is displayed. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
  • Refactored binary formatting in CSV and box exporters to use the shared util.BinaryFormatter, replacing previous ad-hoc or duplicated logic. [1] [2] [3] [4]
  • Updated and expanded test coverage for all binary formatting options in table and CSV outputs to ensure correctness and demonstrate the new features. [1] [2] [3] [4] [5] [6] [7]

Append worker management:

  • Introduced a new appendersControl channel and AppendWorkerControl struct to allow stopping append workers for specific tables in a thread-safe and synchronous manner, along with a new StopAppendWorker function. [1] [2] [3]
  • Standardized table name handling to lowercase in append worker functions to avoid inconsistencies. [1] [2] [3]

Dependency updates:

  • Updated github.com/machbase/neo-client to a newer development version in go.mod.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 65.25285% with 213 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.76%. Comparing base (0ebf93c) to head (1090c1f).

Files with missing lines Patch % Lines
mods/tql/fx_generate.gen.go 50.84% 58 Missing and 29 partials ⚠️
mods/bridge/nats.go 45.28% 28 Missing and 1 partial ⚠️
mods/scheduler/sched_subs.go 37.77% 26 Missing and 2 partials ⚠️
jsh/lib/http/router.go 76.08% 17 Missing and 5 partials ⚠️
mods/bridge/mqtt.go 60.00% 12 Missing and 2 partials ⚠️
mods/tql/fm_dbsink.go 41.17% 4 Missing and 6 partials ⚠️
mods/scheduler/sched_timer.go 66.66% 7 Missing and 1 partial ⚠️
jsh/lib/ws/ws.go 64.70% 4 Missing and 2 partials ⚠️
mods/codec/opts/generate.gen.go 40.00% 3 Missing ⚠️
mods/codec/internal/json/json_encode.go 80.00% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #408      +/-   ##
==========================================
+ Coverage   62.87%   63.76%   +0.89%     
==========================================
  Files         352      352              
  Lines       68649    68892     +243     
==========================================
+ Hits        43161    43929     +768     
+ Misses      20915    20345     -570     
- Partials     4573     4618      +45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Introduced ContextWithEventLoop and EventLoopFromContext functions to manage event loop context.
- Updated RegisterNativeModule to utilize the new context functions.
- Modified HTTP module to pass the event loop to NewServer.
- Enhanced WebSocket handling to support event loop execution for callbacks.
- Refactored MqttBridge and NatsBridge to use atomic operations for connection state management.
- Improved SubscriberEntry and TimerEntry to use new state management methods for better concurrency safety.
…uter, pretty table, MQTT and NATS bridges, and scheduler
@OutOfBedlam OutOfBedlam merged commit cbe279c into main May 15, 2026
9 checks passed
@OutOfBedlam OutOfBedlam deleted the wip-bindata branch May 15, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant