Getting Started
Installation
Platform requirements and NuGet packages
#Installation
#Package Availability
Note: The PhoenixmlDb database packages are not yet published on NuGet. The commands below will not resolve until they are.
The database is split into the following packages. Each package ID is the project name.
|
Package |
Description |
Use Case |
|---|---|---|
|
|
LMDB storage core: |
Embedded use (base package) |
|
|
Index maintenance, enabled with |
Embedded use with indexes |
|
|
gRPC client SDK |
Connect to a PhoenixmlDb server |
PhoenixmlDb.Storage depends on the published PhoenixmlDb.Core and PhoenixmlDb.XQuery
packages. The database is built against these versions:
|
Package |
Version |
|---|---|
|
|
2.4.0 |
|
|
2.8.0 |
|
|
2.8.0 |
|
|
0.23.1 |
For code that uses PhoenixmlDb.Core directly, NodeReader takes a string-value resolver:
new NodeReader(buffer, resolver), or NodeReader.WithoutStringValueResolver(buffer). Reading the
string value of a node that has children, no computed value and no resolver throws unless the
switch PhoenixmlDb.Xdm.StrictStringValue is set to false.
#Embedded Installation
For embedded use in a single application, once the packages are published:
dotnet add package PhoenixmlDb.Storage
# Optional: index maintenance
dotnet add package PhoenixmlDb.Indexing
#Engine Packages
The XQuery and XSLT engines the database is built on are published on NuGet and can be used on their own, without the database:
dotnet add package PhoenixmlDb.XQuery
dotnet add package PhoenixmlDb.Xslt
The engine packages target net8.0 and net10.0.
#Platform Requirements
-
The database projects target .NET 10 (
net10.0). -
LMDB native binaries are supplied by the
LightningDBpackage dependency, so no separateliblmdbinstall is needed. -
Linux needs glibc 2.38 or later. Debian 12 (glibc 2.36) does not meet it. Ubuntu 22.04, RHEL 9 and Amazon Linux 2023 ship older glibc versions than 2.38 and do not meet it either. See Upgrading to LMDB 1.0.
-
ICU globalization must be available. Do not set
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1: the query engines depend on ICU fornormalize-unicode(), collations, and regex character classes.
#Verifying Installation
Create a simple test to verify the installation:
using PhoenixmlDb.Storage;
// Create a temporary database (the directory is created if missing)
var tempPath = Path.Combine(Path.GetTempPath(), "phoenixml-test");
await using (var db = new DocumentDatabase(tempPath))
{
// Create a container
var test = await db.CreateContainerAsync("test");
// Store and retrieve a document
await test.PutDocumentAsync("hello.xml", "<greeting>Hello, PhoenixmlDb!</greeting>");
var doc = await test.GetDocumentAsync("hello.xml");
Console.WriteLine(await doc!.GetContentAsync());
}
// Cleanup
Directory.Delete(tempPath, recursive: true);
Console.WriteLine("Installation verified successfully!");
#Next Steps
|
Learn Basics |
Configure |
Deploy |
|---|---|---|
|
Quick Start Learn the basics with hands-on examples. |
Configuration Configure storage and performance options. |
Deployment Deploy in server or cluster mode. |