MeDB.NetCoreDbX 10.2.8028

dotnet add package MeDB.NetCoreDbX --version 10.2.8028                
NuGet\Install-Package MeDB.NetCoreDbX -Version 10.2.8028                
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="MeDB.NetCoreDbX" Version="10.2.8028" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MeDB.NetCoreDbX --version 10.2.8028                
#r "nuget: MeDB.NetCoreDbX, 10.2.8028"                
#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.
// Install MeDB.NetCoreDbX as a Cake Addin
#addin nuget:?package=MeDB.NetCoreDbX&version=10.2.8028

// Install MeDB.NetCoreDbX as a Cake Tool
#tool nuget:?package=MeDB.NetCoreDbX&version=10.2.8028                

关于 MeDB.NetCoreDbX

MeDB.NetCoreDbX 是为访问 MeDB & MySQL 数据库支持访问 XPlugin (net6,net8)驱动程序集。

已内置程序集

  • K4os.Compression.LZ4.Streams 1.3.7
  • K4os.Compression.LZ4 1.3.7
  • K4os.Hash.xxHash 1.0.8
  • Portable.BouncyCastle 1.9.0
  • ZstdSharp.Port 0.7.4

需引用程序集

简单示例

using MeDB.MedbX;

// 连接字符串
var conn = $"netcore:medb://主机:端口/数据库?user=用户&password=密码";

// 使用连接字符串,打开会话
using (var session = new SessionFactory().GetSession(conn))
{

  // 1)使用指定 NXDO.Data 配置信息,打开会话
  //using (var session = new SessionFactory().GetSession(typeof(NXDO.Data.DbClient.AnyDbConnection)))

  // 2)使用指定的属性值,打开会话
  //using (var session = new SessionFactory().GetSession("主机", "数据库", "用户", "密码"))

  var schema = session.DefaultSchema;
  var coll = schema.CreateCollection("myBooks", true);

  // 与java一致的写法
  var newDoc = new DbDoc();
  newDoc.SetValue("isbn", "ttt");
  newDoc.SetValue("lang", "C#");
  newDoc.SetValue("title", "Effi Briest");
  newDoc.SetValue("author", "Theodor Fontane");
  newDoc.SetValue("currentlyReadingPage", 42);
  newDoc.SetValue("d", DateTime.Now);
  coll.Add(newDoc).Execute();

  // C#写法,直接匿名类或 json 字符串的方式
  var stmt = coll.Add("{ \"foo\": 1 }");
  stmt.Execute();

  // 查询
  var docs = coll.Find("$.title = 'Effi Briest' and $.currentlyReadingPage > 10").Execute();
  while (docs.MoveNext()) {
    var id = docs.Current.Id;
    System.Diagnostics.Debug.WriteLine(id);

    var v = docs.Current["title"];
    System.Diagnostics.Debug.WriteLine(v);
    Console.WriteLine(docs.Current);
  }
}

相关程序包

  • 数据实体 NXDO.Data 支持从 NXDO.Data 的配置中获取 XPlugin 连接,非该包作者单位的开发人员请谨慎使用本程序。
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible. 
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
10.2.8028 83 11/15/2024