QuasarDB API for .NET
website·Indexed 33 days ago
https://doc.quasar.ai/master/Technical reference documentation for the QuasarDB API for .NET, including details on parameters, return values, and property references.
What's inside QuasarDB
- The Quasar OLAP interface transforms a Quasar cluster into a data warehouse by using DuckDB as the SQL front end. It allows for analytical workloads with low-latency updates, leveraging Quasar for pruning, filtering, parallelism, and scaling (compute/storage pushdown). It is available as a REST server (SQL over HTTP and JSON/Arrow), a standalone shell, and a DuckDB extension (requires DuckDB v1.5.0 or later). QuasarDB 3.14.2 or later is required.
Overview of the Quasardb.Query namespace
TheQuasardb.Querynamespace provides the core types required to execute queries and process results in the Quasardb .NET API. It includes classes for managing query result sets, individual rows, cells, and continuous query configurations.Overview of Quasardb.TimeSeries Namespace
TheQuasardb.TimeSeriesnamespace provides the core components for interacting with time-series data in QuasarDB using .NET. It includes classes for managing tables, columns, and specific data point types (Double, Int64, String, Blob, and Timestamp), as well as collections for these points and definitions for creating columns.Overview of QuasarDB Continuous Queries
Continuous queries allow a server to send results to a client automatically when data changes, rather than the client polling the server at regular intervals. This provides low-latency updates with optimal resource usage. Any valid SELECT query can be run as a continuous query. Results are real-time and not pre-computed.Overview of quasardb REST API (qdb_rest)
Theqdb_restAPI allows communication with a QuasarDB cluster using JSON objects. It is primarily used to execute queries and translate the results into JSON format.Overview of the Quasar cryptocurrency feed handler
The Quasar cryptocurrency feed handler is a low-latency, high-throughput tool written in C++ 20 that connects to cryptocurrency exchanges, decodes messages, and stores data in QuasarDB. It is delivered as a single binary with no dependencies.
Key Capabilities:
- Captures full order book (Level 3), trades, and ticker information.
- Currently supports Coinbase (all Coinbase products are supported).
- Designed for high-performance data capture using zero-copy networking and Quasar's batch API.
- Available in the Quasar distribution package starting with version 3.13.2.
Important Note: This tool is currently under development and is not considered production-ready.
Overview of Quasardb .NET API Components
The Quasardb .NET API provides a set of classes and interfaces to interact with a Quasardb database. Key components include:
- Connectivity:
QdbClusterfor database connections andQdbConnectionFactoryfor configuring connection properties. - Data Types: Specialized classes for different data types including
QdbBlob(unstructured data),QdbDouble(atomic double),QdbInteger(atomic integer),QdbString(UTF-8 string),QdbTimestamp(atomic timestamp), andQdbTag. - Entry Management:
QdbEntryfor general entries,QdbExpirableEntryfor entries with expiry times, andQdbUnknownEntryfor types not natively supported by the .NET API. - Selection/Filtering: Various selectors to retrieve data, such as
QdbPrefixSelector(by alias prefix),QdbSuffixSelector(by alias suffix),QdbPatternSelector(by pattern),QdbRegexSelector(by regular expression), andQdbTagSelector(by attached tags). - Batch Operations:
QdbBatchand its specialized variants (QdbBatchBlob,QdbBatchEntry,QdbBatchInteger) for grouping multiple operations together. - Diagnostics:
QdbLoggerBuilderfor logger configuration andQdbPerformanceTrace/QdbPerformanceMeasurefor performance monitoring.
- Connectivity:
Overview of QuasarDB Query Language
QuasarDB provides a domain-specific language (DSL) with a syntax similar to SQL, designed to simplify data composition, joins, and interactive database work. It is specifically optimized to extract small subsets of data (thousands of entries) from massive datasets (billions of entries) within seconds. Unlike traditional relational databases, QuasarDB includes native support for time-series data and tags while abstracting the complexity of distributed computing.Overview of the Quasardb.TimeSeries.Reader namespace
TheQuasardb.TimeSeries.Readernamespace provides the necessary classes and structures to read time series data from QuasarDB. It supports standard table reading, stream reading, and high-performance bulk read operations.Overview of QuasarDB Batch Inserter
The QuasarDB batch inserter provides an interface to send data to a QuasarDB cluster. Data is buffered client-side and sent in a single logical batch to ensure efficiency and transactional consistency. The batch inserter supports inserting data into multiple tables within a single atomic operation.Overview of qdb_dbtool
The
qdb_dbtoolis a command-line utility used to analyze, dump, repair, upgrade, backup, restore, and verify backups of a QuasarDB node.CRITICAL: DBTool requires exclusive access to the database files. The QuasarDB daemon must be stopped before running this tool. Improper usage can irreversibly damage the database.
Retrieve entry metadata by alias
Useqdb_get_metadatato fetch meta-information about an entry using its alias.qdb_error_t qdb_get_metadata(qdb_handle_t handle, const char *alias, qdb_entry_metadata_t *entry_metadata);