ProtonDB.Client
1.0.1
dotnet add package ProtonDB.Client --version 1.0.1
NuGet\Install-Package ProtonDB.Client -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ProtonDB.Client" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ProtonDB.Client" Version="1.0.1" />
<PackageReference Include="ProtonDB.Client" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ProtonDB.Client --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ProtonDB.Client, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ProtonDB.Client@1.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ProtonDB.Client&version=1.0.1
#tool nuget:?package=ProtonDB.Client&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
๐ง ProtonDB.Client
ProtonDB.Client is a lightweight .NET library that allows you to connect and interact with a ProtonDB server using simple query commands โ just like working with MySQL or SQLite connectors.
๐ Plug it into your apps, CLI tools, or services to send queries and retrieve results from ProtonDB over TCP.
๐ Features
- Connect to a running ProtonDB server via TCP
- Send queries, fetch results, and handle errors easily
- Supports login with privilege-based access
- Fetch full result sets or individual entries
- Toggle debug logs
- Gracefully close connections
- Easily serializable JSON-based responses
๐ฆ Installation
If published to NuGet:
dotnet add package ProtonDB.Client
Or reference it manually in your project:
<ProjectReference Include="path/to/ProtonDB.Client.csproj" />
๐ ๏ธ Usage
using ProtonDB.Client;
var conn = Connection.Connect("127.0.0.1", 9090, "admin", "yourpassword");
var cursor = new Cursor(conn);
// Send a query
cursor.Query("select(name: 'Alice')");
// Fetch all results
var results = cursor.FetchAll();
foreach (var row in results) {
Console.WriteLine(row);
}
// Fetch one result
var single = cursor.FetchOne();
// Map result to object
var student = cursor.Map<Student>();
// Quit session
cursor.Quit();
๐ Authentication
Login is handled via:
Connection.Connect("127.0.0.1", 9090, "username", "password");
- Credentials are never sent in plain text โ only a checksum is verified on the server.
- Privileges (guest, user, admin) restrict access to certain commands or databases.
๐งช API Summary
Connection
Connect(host, port, username?, password?)โ opens session and logs inReconnect()โ reestablishes dropped connectionDispose()โ safely closes the session
Cursor
Query(string)โ submits a querySafeQuery(string)โ submits a query and auto-reconnects if disconnectedFetchAll()โstring[]โ gets all resultsFetchOne()โstringโ gets the first resultMap<T>()โTโ deserializes one result to objectMapAll<T>()โT[]โ deserializes all resultsDebug(bool)โ enables or disables debug logsProfile()โ gets details about the current profileQuit()โ clean disconnect
๐งฉ Requirements
- .NET 6.0 or later
- Running instance of ProtonDB.Server
๐ก๏ธ Security Notes
- No raw SQL or command strings are interpreted by the client.
- Authentication uses checksum verification with salted hashes.
๐ License
MIT โ free to use, modify, or distribute.
๐ค Author
Created by Kisetsu (Dharshik)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.