Represents a Hypertable namespace, provides methods to handle Hypertable tables.

Namespace: Hypertable
Assembly: ht4n (in ht4n.dll) Version: 0.9.8.11 (0.9.8.11)

Syntax

         
 C#  Visual Basic  Visual C++ 
public interface INamespace : IDisposable
Public Interface INamespace _
	Inherits IDisposable
public interface class INamespace : IDisposable

Members

         
 All Members  Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
AlterTable(String, String)
Alter an existing table.
CreateNamespace(String)
Creates a new sub namespace.
CreateNamespace(String, CreateDispositions)
Creates a new sub namespace.
CreateTable(String, String)
Creates a new table.
CreateTable(String, String, CreateDispositions)
Creates a new table.
CreateTableLike(String, String)
Creates a new table like another existing.
CreateTableLike(String, String, CreateDispositions)
Creates a new table like another existing.
Dispose()()()()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable.)
DropNamespace(String)
Drops an existing sub namespace.
DropNamespace(String, DropDispositions)
Drops an existing sub namespace.
DropNamespaces(DropDispositions)
Drops all sub namespaces.
DropNamespaces(Regex, DropDispositions)
Drops existing sub namespaces.
DropTable(String)
Drops a table.
DropTable(String, DropDispositions)
Drops an existing table.
DropTables()()()()
Drops all tables in this namespace.
DropTables(Regex, DropDispositions)
Drops existing tables.
Exec(array<String>[]()[][])
Executes a HQL command.
GetListing()()()()
Gets the namespace listing.
GetListing(Boolean)
Gets the namespace listing.
GetTableSchema(String)
Returns the xml table schema for the specified table.
GetTableSchema(String, Boolean)
Returns the xml table schema for the specified table.
IsDisposed
Gets a value indicating whether the object has been disposed.
Name
Gets the namespace name.
NamespaceExists(String)
Checks if a sub namespace exists.
Namespaces
Gets all sub namespace names.
OpenNamespace(String)
Opens an existig sub namespace.
OpenNamespace(String, OpenDispositions)
Opens or create a sub namespace.
OpenTable(String)
Opens an existing table.
OpenTable(String, OpenDispositions)
Opens an existing table.
OpenTable(String, String, OpenDispositions)
Opens or create a table.
Query(array<String>[]()[][])
Executes a HQL query.
RenameTable(String, String)
Rename an existing table.
TableExists(String)
Checks if a table exists in this namespace.
Tables
Gets all table names.

Examples

The following example shows how to create a table using the xml schema.
CopyC#
string schema = 
   "<Schema>"
+     "<AccessGroup name=\"default\">"
+     "<ColumnFamily>"
+         "<Name>cf</Name>"
+     "</ColumnFamily>"
+     "</AccessGroup>"
+ "</Schema>";

using( var ctx = Context.Create("Provider=Hyper; Uri=localhost") ) {
   using( var client = ctx.CreateClient() ) {
      using( var ns = client.OpenNamespace("test", OpenDispositions.OpenAlways) ) {
         using( Table table = ns.OpenTable("t1", schema, OpenDispositions.OpenAlways) ) {
            // use table
         }
      }
   }
}
The following example shows how to create a table using HQL.
CopyC#
using( var ctx = Context.Create("Provider=Hyper; Uri=localhost") ) {
   using( var client = ctx.CreateClient() ) {
      using( var ns = client.OpenNamespace("test", OpenDispositions.OpenAlways) ) {
         if( !table.TableExists("t1") ) {
            ns.Exec("CREATE TABLE t1 (cf)");
         }
         using( var table = ns.OpenTable("t1") ) {
            // use table
         }
      }
   }
}

See Also