• Start

Languages

/

.NET

/

Methods

Export

The .NET SDK for SurrealDB enables simple and advanced querying of a remote or embedded database.

Export the database as a SurrealQL script.
To use this method, you need to be connected to a SurrealDB instance that is version >= 2.1.0.

Method Syntax
await db.Export(options)

Arguments

Description

options

Export configuration options.

cancellationToken

The cancellationToken enables graceful cancellation of asynchronous operations.

Only exporting db functions in a schema variable
var options = new ExportOptions
{
    Users = false,
    Accesses = false,
    Params = false,
    Functions = true,
    Users = false,
    Versions = false,
    Tables = false,
    Records = false,
};

string schema = await db.Export(options);

Was this page helpful?