net-questdb-client
3.0.0
dotnet add package net-questdb-client --version 3.0.0
NuGet\Install-Package net-questdb-client -Version 3.0.0
<PackageReference Include="net-questdb-client" Version="3.0.0" />
<PackageVersion Include="net-questdb-client" Version="3.0.0" />
<PackageReference Include="net-questdb-client" />
paket add net-questdb-client --version 3.0.0
#r "nuget: net-questdb-client, 3.0.0"
#:package net-questdb-client@3.0.0
#addin nuget:?package=net-questdb-client&version=3.0.0
#tool nuget:?package=net-questdb-client&version=3.0.0
Basic usage
using var sender = Sender.New("http::addr=localhost:9000;");
await sender.Table("trades")
.Symbol("symbol", "ETH-USD")
.Symbol("side", "sell")
.Column("price", 2615.54)
.Column("amount", 0.00044)
.AtAsync(new DateTime(2021, 11, 25, 0, 46, 26));
await sender.SendAsync();
Multi-line send (sync)
using var sender = Sender.New("http::addr=localhost:9000;");
for(int i = 0; i < 100; i++)
{
sender.Table("trades")
.Symbol("symbol", "ETH-USD")
.Symbol("side", "sell")
.Column("price", 2615.54)
.Column("amount", 0.00044)
.At(DateTime.UtcNow);
}
sender.Send();
Auto-Flush
By default, the client will flush every 75,000 rows (HTTP) or 600 rows (TCP).
Alternatively, it will flush every 1000ms.
This is equivalent to a config string of:
using var sender = Sender.New("http:addr=localhost:9000;auto_flush=on;auto_flush_rows=75000;auto_flush_interval=1000;");
A final flush or send should always be used, as auto flush is not guaranteed to send all pending data before the sender is disposed.
Flush every 1000 rows or every 1 second
using var sender = Sender.New("http::addr=localhost:9000;auto_flush=on;auto_flush_rows=1000;");
Flush every 5000 rows
using var sender = Sender.New("http::addr=localhost:9000;auto_flush=on;auto_flush_rows=1000;auto_flush_interval=off;");
Flush after 5 seconds
using var sender = Sender.New("http::addr=localhost:9000;auto_flush=on;auto_flush_rows=off;auto_flush_interval=5000;");
Flush only when buffer is 4kb
using var sender = Sender.New("http::addr=localhost:9000;auto_flush=on;auto_flush_bytes=4096;auto_flush_rows=off;auto_flush_interval=off;");
Authenticated
HTTP Authentication (Basic)
using var sender = Sender.New("https::addr=localhost:9009;tls_verify=unsafe_off;username=admin;password=quest;");
HTTP Authentication (Token)
using var sender = Sender.New("https::addr=localhost:9009;tls_verify=unsafe_off;username=admin;token=<bearer token>");
TCP Authentication
💥 From net-questdb-client Version 2.1.0, if you want to use TCP Authentication, you must add a reference to https://www.nuget.org/packages/net-questdb-client-tcp-auth/.
using var sender = Sender.New("tcps::addr=localhost:9009;tls_verify=unsafe_off;username=admin;token=NgdiOWDoQNUP18WOnb1xkkEG5TzPYMda5SiUOvT1K0U=;");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on net-questdb-client:
Package | Downloads |
---|---|
net-questdb-client-tcp-auth
QuestDB ILP protocol client additional TCP token authentication add-on. Required when used with TCP ILP with token authentication |
|
Anrui.QuestDb
基于net-questdb-client的QuestDB封装 |
GitHub repositories
This package is not used by any popular GitHub repositories.