谁能帮我解决我的问题:我在 C# 中创建了一个命名空间和一个带有 HT4N 的表,如下所示:
static void Main(string[] args)
{
string hql =
"CREATE TABLE AlarmTable ("
+ "TimeStamp,"
+ "TagId,"
+ "ParameterId,"
+ "Description,"
+ "ACCESS GROUP default (TimeStamp, TagId, ParameterId),"
+ "ACCESS GROUP profile (Description)"
+ ");";
var cell = new Cell
{
Key = key,
Value = value,
Flag = CellFlag.Default // optional, CellFlag.Default is the default cell flag
};
var connectionString = "Provider=Hyper;Uri=net.tcp://localhost";
using (var context = Context.Create(connectionString))
using (var client = context.CreateClient())
{
if (!client.NamespaceExists("/IPAA"))
client.CreateNamespace("/IPAA");
using (var ns = client.OpenNamespace("IPAA"))
{
ns.Exec(hql);
using (var table = ns.OpenTable("AlarmTable"))
{
using (var mutator = table.CreateMutator())
{
//some code here
}
}
}
}
}
有人可以告诉我现在如何使用 mutator 在我新创建的表中创建一个简单的条目,一些对新手有意义的简单代码片段将不胜感激!谢谢,尼尔