Definition at line 12 of file TableQueryTests.cs.
void Deveel.Data.Linq.TableQueryTests.AddTestData |
( |
IQuery |
context | ) |
|
|
inlineprivate |
Definition at line 44 of file TableQueryTests.cs.
46 var row = table.NewRow();
49 row.SetDefault(0, context);
50 row.SetValue(
"first_name", DataObject.String(
"John"));
51 row.SetValue(
"last_name", DataObject.String(
"Doe"));
52 row.SetValue(
"birth_date", DataObject.Date(
new SqlDateTime(1977, 01, 01)));
53 row.SetValue(
"active", DataObject.Boolean(
false));
59 row.SetDefault(0, context);
60 row.SetValue(
"first_name", DataObject.String(
"Jane"));
61 row.SetValue(
"last_name", DataObject.String(
"Doe"));
62 row.SetValue(
"birth_date", DataObject.Date(
new SqlDateTime(1978, 11, 01)));
63 row.SetValue(
"active", DataObject.Boolean(
true));
69 row.SetDefault(0, context);
70 row.SetValue(
"first_name", DataObject.String(
"Roger"));
71 row.SetValue(
"last_name", DataObject.String(
"Rabbit"));
72 row.SetValue(
"birth_date", DataObject.Date(
new SqlDateTime(1985, 05, 05)));
73 row.SetValue(
"active", DataObject.Boolean(
true));
static ObjectName Parse(string s)
Parses the given string into a ObjectName object.
Describes the name of an object within a database.
override ISession Deveel.Data.Linq.TableQueryTests.CreateAdminSession |
( |
IDatabase |
database | ) |
|
|
inlineprotectedvirtual |
Reimplemented from Deveel.Data.ContextBasedTest.
Definition at line 17 of file TableQueryTests.cs.
18 using (var session = base.CreateAdminSession(database)) {
19 using (var query = session.CreateQuery()) {
27 return base.CreateAdminSession(database);
void AddTestData(IQuery context)
void CreateTestTable(IQuery context)
void Deveel.Data.Linq.TableQueryTests.CreateTestTable |
( |
IQuery |
context | ) |
|
|
inlineprivate |
Definition at line 30 of file TableQueryTests.cs.
40 context.CreateTable(tableInfo);
41 context.AddPrimaryKey(tableInfo.TableName,
"id",
"PK_PEOPLE_TABLE");
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static ObjectName Parse(string s)
Parses the given string into a ObjectName object.
static BooleanType Boolean()
static NumericType Integer()
Describes the name of an object within a database.
void AddColumn(ColumnInfo column)
Adds a new column to the table at the last position of the columns list in the table metadata...
static DateType DateTime()
static StringType String()
Defines the base class for instances that represent SQL expression tree nodes.
static SqlConstantExpression Constant(object value)
static SqlFunctionCallExpression FunctionCall(ObjectName functionName)
Defines the metadata properties of a table existing within a database.
void Deveel.Data.Linq.TableQueryTests.FindById |
( |
| ) |
|
|
inline |
Definition at line 84 of file TableQueryTests.cs.
86 Assert.DoesNotThrow(() => entity =
Context.Table<Person>().FindById(1));
87 Assert.IsNotNull(entity);
88 Assert.AreEqual(1, entity.Id);
89 Assert.AreEqual(
"John", entity.FirstName);
override void Deveel.Data.Linq.TableQueryTests.OnSetUp |
( |
string |
testName | ) |
|
|
inlineprotectedvirtual |
void Deveel.Data.Linq.TableQueryTests.ProjectFirst |
( |
| ) |
|
|
inline |
Definition at line 42 of file TableQueryTests.cs.
43 IQueryable<Person> queryable = null;
44 Assert.DoesNotThrow(() => queryable =
table.AsQueryable<Person>());
45 Assert.IsNotNull(queryable);
48 Assert.DoesNotThrow(() => first = queryable.First());
49 Assert.IsNotNull(first);
50 Assert.AreEqual(
"Antonello", first.FirstName);
51 Assert.AreEqual(
"Provenzano", first.LastName);
52 Assert.AreEqual(1, first.Id);
53 Assert.AreEqual(0, first.Age);
void Deveel.Data.Linq.TableQueryTests.QueryById |
( |
| ) |
|
|
inline |
Definition at line 93 of file TableQueryTests.cs.
95 Assert.DoesNotThrow(() => entity =
Context.Table<Person>().FirstOrDefault(x => x.Id == 1));
96 Assert.IsNotNull(entity);
97 Assert.AreEqual(1, entity.Id);
98 Assert.AreEqual(
"John", entity.FirstName);
void Deveel.Data.Linq.TableQueryTests.TestSetup |
( |
| ) |
|
|
inline |
Definition at line 16 of file TableQueryTests.cs.
22 table =
new TemporaryTable(tableInfo);
24 var tempTable = (TemporaryTable)
table;
25 tempTable.NewRow(
new[] {
27 DataObject.String(
"Antonello"),
28 DataObject.String(
"Provenzano"),
31 tempTable.NewRow(
new[] {
33 DataObject.String(
"Moritz"),
34 DataObject.String(
"Krull"),
35 DataObject.TinyInt(31)
38 tempTable.BuildIndexes();
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static ObjectName Parse(string s)
Parses the given string into a ObjectName object.
Describes the name of an object within a database.
static NumericType TinyInt(int size)
static StringType String()
ITable Deveel.Data.Linq.TableQueryTests.table |
|
private |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb-nunit/Deveel.Data.Linq/TableQueryTests.cs