CloudTheWolf.DSharpPlus.Scaffolding.Data 3.4.0.1

dotnet add package CloudTheWolf.DSharpPlus.Scaffolding.Data --version 3.4.0.1
                    
NuGet\Install-Package CloudTheWolf.DSharpPlus.Scaffolding.Data -Version 3.4.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="CloudTheWolf.DSharpPlus.Scaffolding.Data" Version="3.4.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CloudTheWolf.DSharpPlus.Scaffolding.Data" Version="3.4.0.1" />
                    
Directory.Packages.props
<PackageReference Include="CloudTheWolf.DSharpPlus.Scaffolding.Data" />
                    
Project file
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 CloudTheWolf.DSharpPlus.Scaffolding.Data --version 3.4.0.1
                    
#r "nuget: CloudTheWolf.DSharpPlus.Scaffolding.Data, 3.4.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 CloudTheWolf.DSharpPlus.Scaffolding.Data@3.4.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=CloudTheWolf.DSharpPlus.Scaffolding.Data&version=3.4.0.1
                    
Install as a Cake Addin
#tool nuget:?package=CloudTheWolf.DSharpPlus.Scaffolding.Data&version=3.4.0.1
                    
Install as a Cake Tool

CloudTheWolf.DSharpPlus.Scaffolding

CloudTheWolf.DSharpPlus.Scaffolding.Data

Database providers for CloudTheWolf DSharpPlus workers and plugins.

Supported SQL providers are MySQL, SQL Server, PostgreSQL, SQLite, SurrealDB, and Supabase PostgreSQL. Firebase Cloud Firestore is exposed separately through the document-oriented IDocumentDatabase API.

SQL databases

Existing synchronous calls remain supported. New code can use typed, cancellation-aware asynchronous methods:

IDatabase database = DatabaseFactory.CreateDatabase(configuration);

IEnumerable<User> users = await database.QueryAsync<User>(
    "select id, name from users where active = @active",
    new { active = true },
    cancellationToken);

Set Database:type to mysql, sqlsrv, pgsql, sqlite, surreal, or supabase.

MySQL

{
  "Database": {
    "type": "mysql",
    "mysql": {
      "server": "localhost",
      "port": 3306,
      "userid": "bot_user",
      "password": "use-a-secret-provider",
      "database": "discord_bot"
    }
  }
}
IDatabase database = DatabaseFactory.CreateDatabase(configuration);

IEnumerable<GuildSettings> settings = await database.QueryAsync<GuildSettings>(
    "SELECT guild_id AS GuildId, prefix AS Prefix FROM guild_settings WHERE guild_id = @guildId",
    new { guildId },
    cancellationToken);

Microsoft SQL Server

{
  "Database": {
    "type": "sqlsrv",
    "sqlsrv": {
      "server": "localhost",
      "port": 1433,
      "userid": "bot_user",
      "password": "use-a-secret-provider",
      "database": "DiscordBot"
    }
  }
}
IDatabase database = DatabaseFactory.CreateDatabase(configuration);

int affected = await database.ExecuteAsync(
    "UPDATE guild_settings SET prefix = @prefix WHERE guild_id = @guildId",
    new { prefix = "!", guildId },
    cancellationToken);

PostgreSQL

{
  "Database": {
    "type": "pgsql",
    "pgsql": {
      "server": "localhost",
      "port": 5432,
      "userid": "bot_user",
      "password": "use-a-secret-provider",
      "database": "discord_bot"
    }
  }
}
IDatabase database = DatabaseFactory.CreateDatabase(configuration);

IEnumerable<GuildSettings> settings = await database.QueryAsync<GuildSettings>(
    "SELECT guild_id AS GuildId, prefix AS Prefix FROM guild_settings WHERE guild_id = @guildId",
    new { guildId },
    cancellationToken);

SQLite

{
  "Database": {
    "type": "sqlite",
    "sqlite": {
      "datasource": "data/discord-bot.db",
      "mode": "ReadWriteCreate",
      "password": ""
    }
  }
}
IDatabase database = DatabaseFactory.CreateDatabase(configuration);

await database.ExecuteAsync(
    "CREATE TABLE IF NOT EXISTS guild_settings (guild_id TEXT PRIMARY KEY, prefix TEXT NOT NULL)",
    cancellationToken: cancellationToken);

SurrealDB

{
  "Database": {
    "type": "surreal",
    "surreal": {
      "server": "http://127.0.0.1:8000",
      "userid": "root",
      "password": "use-a-secret-provider",
      "namespace": "discord",
      "database": "bot"
    }
  }
}

SurrealDB accepts SurrealQL and named parameters:

IDatabase database = DatabaseFactory.CreateDatabase(configuration);

IEnumerable<GuildSettings> settings = await database.QueryAsync<GuildSettings>(
    "SELECT * FROM guild_settings WHERE guild_id = $guildId",
    new { guildId },
    cancellationToken);

await database.ExecuteAsync(
    "UPSERT guild_settings SET guild_id = $guildId, prefix = $prefix WHERE guild_id = $guildId",
    new { guildId, prefix = "!" },
    cancellationToken);

Supabase

Copy a direct or session-pooler PostgreSQL connection string from the Supabase dashboard:

{
  "Database": {
    "type": "supabase",
    "supabase": {
      "connectionString": "Host=db.PROJECT.supabase.co;Port=5432;Username=postgres;Password=...;Database=postgres;SSL Mode=Require"
    }
  }
}

ConnectionStrings:Supabase is also supported. Keep connection strings in user secrets, environment-specific configuration, or another secret store rather than source control.

Supabase uses the same typed SQL methods as PostgreSQL:

IDatabase database = DatabaseFactory.CreateDatabase(configuration);

IEnumerable<GuildSettings> settings = await database.QueryAsync<GuildSettings>(
    "SELECT guild_id AS GuildId, prefix AS Prefix FROM guild_settings WHERE guild_id = @guildId",
    new { guildId },
    cancellationToken);

Firebase Cloud Firestore

Firestore models use the attributes provided by Google.Cloud.Firestore:

[FirestoreData]
public sealed class GuildSettings
{
    [FirestoreProperty]
    public string Prefix { get; set; }
}

Create and use the document provider as follows:

IDocumentDatabase database = DatabaseFactory.CreateDocumentDatabase(configuration);

await database.SetAsync("guild-settings", guildId, settings, merge: true,
    cancellationToken);

DatabaseDocument<GuildSettings> stored = await database.GetAsync<GuildSettings>(
    "guild-settings", guildId, cancellationToken);

IReadOnlyList<DatabaseDocument<GuildSettings>> allSettings =
    await database.GetCollectionAsync<GuildSettings>("guild-settings", cancellationToken);

string newDocumentId = await database.AddAsync(
    "guild-settings", new GuildSettings { Prefix = "?" }, cancellationToken);

await database.DeleteAsync("guild-settings", newDocumentId, cancellationToken);

Configuration:

{
  "Database": {
    "type": "firestore",
    "firebase": {
      "projectId": "my-firebase-project",
      "databaseId": "",
      "detectEmulator": false
    }
  }
}

Firestore uses Google Application Default Credentials. In local or self-hosted environments, set GOOGLE_APPLICATION_CREDENTIALS to a trusted service-account credential file. On Google Cloud, use the workload's attached service account. Set detectEmulator to true when the same build should honor FIRESTORE_EMULATOR_HOST.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.4.0.1 123 8/9/2026
3.1.0 428 11/30/2025
3.0.1.6 318 11/12/2025
3.0.1.4 244 6/26/2025
3.0.1.2 273 6/1/2025
3.0.1.1 236 2/9/2025
3.0.0.8 244 8/3/2024
3.0.0.7 167 8/3/2024
3.0.0.6 158 8/3/2024
3.0.0.4 166 7/31/2024
3.0.0.3 200 7/31/2024
3.0.0.2 158 7/31/2024
3.0.0.1 175 7/30/2024
3.0.0 209 7/28/2024
2.1.0.3 305 4/12/2024
2.1.0.2 278 2/4/2024
2.1.0.1 320 12/10/2023
2.1.0 295 12/5/2023
2.0.0.1 749 4/15/2022
1.0.1.9 529 11/1/2021
Loading failed