RizeDb 2.0.0-beta2
See the version list below for details.
dotnet add package RizeDb --version 2.0.0-beta2
NuGet\Install-Package RizeDb -Version 2.0.0-beta2
<PackageReference Include="RizeDb" Version="2.0.0-beta2" />
paket add RizeDb --version 2.0.0-beta2
#r "nuget: RizeDb, 2.0.0-beta2"
// Install RizeDb as a Cake Addin #addin nuget:?package=RizeDb&version=2.0.0-beta2&prerelease // Install RizeDb as a Cake Tool #tool nuget:?package=RizeDb&version=2.0.0-beta2&prerelease
RizeDb
RizeDb has a object-oriented implementation that allows for the storing, indexing and retrieving of objects. objects are not stored into tables and require very little structure.
RizeDb's object store requires no schema and object values can change types without requiring the database to update all existing data.
Primer
The first step to creating a object store is simply to instantiate the objectStore object with a stream.
using(var stream = new MemoryStream())
{
using(var objectStore = new RizeDb.ObjectStore(stream))
{
//Code goes here
}
}
Once your object store is created, create POCO classes.
public class Order
{
public long Id { get; set; } //This is the only required field
public string Number { get; set; }
public DateTime Date { get; set; }
public List<OrderItem> OrderItems = { get; set; }
}
public class OrderItems
{
public string ItemName { get; set; }
public decimal Price { get; set; }
public int Quantity { get; set; }
}
Now that your POCO classes are created, instantiate and fill an Order object with data.
var order = new Order()
{
Numer = "1001",
Date = DateTime.Now,
OrderItems = new List<OrderItem>();
}
order.OrderItems.Add(new OrderItem()
{
ItemName = "Sun Glasses",
Price = 19.99,
Quantity = 1
});
order.OrderItems.Add(new OrderItem()
{
ItemName = "Flashlight",
Price = 10.50,
Quantity = 4
});
Once your order is ready to be stored simply add it to a object collection.
objectStore.Store("Orders", order);
This will store the order object and its' items as one object into a collection named "Orders". If the collection "Orders" does not already exist it will be created. Now that the order object has been stored into a collection it will have a unique value assigned to the Id property of order. This The Id value is what will be used to retrieve, update or delete the order in the future.
Retrieving your object is as simple as requesting it by Id.
var order = objectStore.Retreive<order>("Orders", 1 /*Assuming the object Id is 1*/);
The retrieve method will create an Order object and its' OrderItem objects and populate them with the exact same data that was stored.
You can also lookup objects by values.
var orders = objectStore.Retreive<order>("Orders", o => o.Number == "1001");
This call to the Retrieve method will create an IEnumerable object containing all Orders objects with the Number "1001".
You can also search by child object values.
var orders = objectStore.Retreive<order>("Orders", o => o.OrderItems.Any(i => i.ItemName == "Flashlight"/);
Again you will get an IEnumerable object containing all orders that have an order item with the ItemName of "Flashlight".
You can even use a different object to retrieve data.
public class OrderHeader
{
public long Id { get; set; }
public string Number { get; set; }
}
var orderHeader = objectStore.Retreive<OrderHeader>("Orders", 1 /*Assuming the object Id is 1*/);
This call will create and return an OrderHeader object with the Number property set to "1001".
And finally you can change the type of the property and the values will still get set as long as they are compatible.
public class OrderHeader2
{
public long Id { get; set; }
public int Number { get; set; } //<-- This was changed to an Int32
}
var orderHeader2 = objectStore.Retreive<OrderHeader2>("Orders", 1 /*Assuming the object Id is 1*/);
Now the newly create OrderHeader2 will have an integer value for the Number property set to 1001. Changing types will work for most types, but some are not compatible and will either be null or default when the object is retrieved.
Visit vizeotech.com for full documentation.
vizeotech@outlook.com
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. 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 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Memory (>= 4.5.4)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
-
net5.0
- System.Memory (>= 4.5.5)
-
net6.0
- System.Memory (>= 4.5.5)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on RizeDb:
Package | Downloads |
---|---|
EnvironmentVault2.Shared
Supporting assembly for Environment Vault. |
|
EnvironmentVault.Shared
Companion assemblies for Environment Vault |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.0 | 108 | 8/28/2024 |
2.0.0-beta5 | 113 | 8/11/2023 |
2.0.0-beta4 | 119 | 1/23/2023 |
2.0.0-beta3 | 181 | 9/18/2022 |
2.0.0-beta2 | 182 | 9/18/2022 |
2.0.0-beta | 141 | 9/6/2022 |
1.6.5 | 517 | 7/20/2021 |
1.6.0 | 355 | 5/16/2021 |
1.5.0 | 503 | 4/11/2021 |
1.4.0 | 495 | 4/8/2021 |
1.3.5 | 334 | 3/21/2021 |
1.3.0 | 647 | 9/16/2020 |
1.2.0 | 414 | 9/10/2020 |
1.1.0 | 497 | 8/19/2020 |
1.0.2 | 469 | 7/9/2020 |
1.0.1 | 574 | 7/26/2019 |
1.0.0 | 657 | 7/24/2019 |