Skip to content
This repository was archived by the owner on Jun 22, 2018. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HStore.NET

HStore.NET is provide PostgreSQL HStore class.

Basic Usage

var a = HStore.Parse("'foo=>bar,baz=>whatever'");
Trace.Assert(a["foo"] == "bar");
Trace.Assert(a.Get("baz") == "whatever");
Trace.Assert(a.ToString() == "'foo=>bar,baz=>whatever'");

var b = new HStore(new Dictionary<string, HStore.Value>() {
    ["foo"] = "bar",
    ["xxx"] = 123,
});

var c = new HStore(new {X = 10, Y = 30, Z = 500});
var xyz = c.Get("X", "Y", "Z");
Trace.Assert(xyz[0] == "10");
Trace.Assert(xyz[1] == "30");
Trace.Assert(xyz[2] == "500");

var d = a.Concat(b);
Trace.Assert(d["foo"] == "bar");
Trace.Assert(d["xxx"] == "123");

About

Hstore class for .NET Framework

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages