DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Protected Member Functions | List of all members
Deveel.Data.Sql.CursorTests Class Reference
Inheritance diagram for Deveel.Data.Sql.CursorTests:
Deveel.Data.ContextBasedTest

Public Member Functions

void DeclareInsensitiveCursor ()
 
- Public Member Functions inherited from Deveel.Data.ContextBasedTest
void TestSetUp ()
 
void TestFixtureSetUp ()
 
void TestTearDown ()
 
void TestFixtureTearDown ()
 

Protected Member Functions

override ISession CreateAdminSession (IDatabase database)
 
- Protected Member Functions inherited from Deveel.Data.ContextBasedTest
virtual void RegisterServices (ServiceContainer container)
 
virtual ISystem CreateSystem ()
 
virtual IDatabase CreateDatabase (ISystem system, IConfiguration configuration)
 
virtual IQuery CreateQuery (ISession session)
 
ISession CreateUserSession (string userName, string password)
 
virtual void OnSetUp (string testName)
 
virtual void OnTearDown ()
 

Additional Inherited Members

- Protected Attributes inherited from Deveel.Data.ContextBasedTest
const string AdminUserName = "SA"
 
const string AdminPassword = "1234567890"
 
const string DatabaseName = "testdb"
 
- Properties inherited from Deveel.Data.ContextBasedTest
virtual bool SingleContext [get]
 
IQuery Query [get, private set]
 
ISystem System [get, private set]
 
IDatabase Database [get, private set]
 
ISession Session [get, private set]
 

Detailed Description

Definition at line 26 of file CursorTests.cs.

Member Function Documentation

override ISession Deveel.Data.Sql.CursorTests.CreateAdminSession ( IDatabase  database)
inlineprotectedvirtual

Reimplemented from Deveel.Data.ContextBasedTest.

Definition at line 27 of file CursorTests.cs.

27  {
28  using (var session = base.CreateAdminSession(database)) {
29  using (var query = session.CreateQuery()) {
30  var tableInfo = new TableInfo(ObjectName.Parse("APP.test_table"));
31  tableInfo.AddColumn("a", PrimitiveTypes.Integer());
32  tableInfo.AddColumn("b", PrimitiveTypes.String(), false);
33 
34  query.CreateTable(tableInfo, false, false);
35  query.Commit();
36  }
37  }
38 
39  return base.CreateAdminSession(database);
40  }
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
void AddColumn(ColumnInfo column)
Adds a new column to the table at the last position of the columns list in the table metadata...
Definition: TableInfo.cs:230
Defines the metadata properties of a table existing within a database.
Definition: TableInfo.cs:41
void Deveel.Data.Sql.CursorTests.DeclareInsensitiveCursor ( )
inline

Definition at line 43 of file CursorTests.cs.

43  {
44  var query = new SqlQueryExpression(new []{new SelectColumn(SqlExpression.Constant("*")) });
45  query.FromClause = new FromClause();
46  query.FromClause.AddTable("test_table");
47 
48  Assert.DoesNotThrow(() => Query.DeclareInsensitiveCursor("c1", query));
49 
50  var exists = Query.ObjectExists(DbObjectType.Cursor, new ObjectName("c1"));
51  Assert.IsTrue(exists);
52  }
A container for the FROM clause of a select statement.
Definition: FromClause.cs:32
Represents a column selected to be in the output of a select statement.
Definition: SelectColumn.cs:31
Defines the base class for instances that represent SQL expression tree nodes.
static SqlConstantExpression Constant(object value)
DbObjectType
The kind of objects that can be handled by a database system and its managers
Definition: DbObjectType.cs:27

The documentation for this class was generated from the following file: