.Export()
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 Syntaxawait db.Export(options)
Arguments | Description | ||
---|---|---|---|
options optional | Export configuration options. | ||
cancellationToken optional | The cancellationToken enables graceful cancellation of asynchronous operations. |
Only exporting db functions in a schema variablevar 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);