https://github.com/tg123/ironleveldb
A leveldb implementation in C#
https://github.com/tg123/ironleveldb
azure-blob dotnet-core leveldb
Last synced: 2 months ago
JSON representation
A leveldb implementation in C#
- Host: GitHub
- URL: https://github.com/tg123/ironleveldb
- Owner: tg123
- License: mit
- Created: 2017-06-02T13:03:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T03:10:59.000Z (over 3 years ago)
- Last Synced: 2024-11-01T05:51:42.833Z (11 months ago)
- Topics: azure-blob, dotnet-core, leveldb
- Language: C#
- Homepage: https://www.nuget.org/packages/IronLeveldb/
- Size: 91.8 KB
- Stars: 27
- Watchers: 6
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IronLeveldb
[](https://badge.fury.io/nu/IronLeveldb)
A leveldb implementation in C#, targeting .NET Standard 1.3 (Frameworks 4.6+, Core 1.0+).
*This project is still under hard working and was built to read leveldb instances on Azure Blob Storage originally,
thus, only partial of READ functions were implemented at the moment.*
## Build the project
The main project can be built using dotnet on any platform,
but the test project is now targeting net46 due to some dependencies,
which can only build and run on Windows.
```
git clone https://github.com/tg123/IronLeveldb.git
dotnet restore
dotnet build
dotnet test IronLeveldb.Test\IronLeveldb.Test.csproj
```## How to use
* Install
```
Install-Package IronLeveldb -Pre
```* Open a local directory
```
var db = IronLeveldbBuilder.BuildFromPath(dbpath)
```
* Open a directory on Azure Blob
```
var storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));var blobClient = storageAccount.CreateCloudBlobClient();
var container = blobClient.GetContainerReference("mycontainer");
var folder = container.GetDirectoryReference("leveldb_directory");
var db = new IronLeveldbOptions
{
Storge = new AzureBlobFolderStorage(folder)
}.Build()
```
More info about blob storage at
## Roadmap// TBD