Definition at line 30 of file QueryTest.cs.
void Deveel.Data.QueryTest.AvgAge |
( |
| ) |
|
|
inline |
Definition at line 47 of file QueryTest.cs.
48 Console.Out.WriteLine(
"Computing the average ages of people in 'Person' table...");
50 IDbCommand command = Connection.CreateCommand();
51 command.CommandText =
"SELECT AVG(age) FROM Person";
52 IDataReader reader = command.ExecuteReader();
55 Console.Out.WriteLine(
"Average age of people: {0}", reader.GetDouble(0));
void Deveel.Data.QueryTest.CountPeople |
( |
| ) |
|
|
inline |
Definition at line 32 of file QueryTest.cs.
33 Console.Out.WriteLine(
"Counting the number of rows in 'Person' table...");
36 IDbCommand statement = Connection.CreateCommand();
39 statement.CommandText =
"SELECT COUNT(*) FROM Person";
40 IDataReader result = statement.ExecuteReader();
42 Console.Out.WriteLine(
"Rows in 'Person' table: " + result.GetInt32(0));
void Deveel.Data.QueryTest.ListIdentities |
( |
| ) |
|
|
inline |
Definition at line 97 of file QueryTest.cs.
98 IDbCommand command = Connection.CreateCommand();
99 command.CommandText =
"SELECT IDENTITY FROM Person";
101 using (IDataReader reader = command.ExecuteReader()) {
103 Console.Out.WriteLine(
"The latest identity for the table Person : {0}", reader.GetInt32(0));
void Deveel.Data.QueryTest.OasisOrBeatles |
( |
| ) |
|
|
inline |
Definition at line 76 of file QueryTest.cs.
79 IDbCommand command = Connection.CreateCommand();
80 command.CommandText =
" SELECT Person.name, MusicGroup.name " +
81 " FROM Person, ListensTo, MusicGroup " +
82 " WHERE MusicGroup.name IN ( 'Oasis', 'Beatles' ) " +
83 " AND Person.name = ListensTo.person_name " +
84 " AND ListensTo.music_group_name = MusicGroup.name " +
85 " ORDER BY MusicGroup.name, Person.name ";
86 IDataReader result = command.ExecuteReader();
87 Console.Out.WriteLine(
"All people that listen to either Beatles or Oasis:");
88 while (result.Read()) {
89 Console.Out.Write(
" " + result.GetString(0));
90 Console.Out.Write(
" listens to ");
91 Console.Out.WriteLine(result.GetString(1));
93 Console.Out.WriteLine();
void Deveel.Data.QueryTest.PeopleInAfrica |
( |
| ) |
|
|
inline |
Definition at line 61 of file QueryTest.cs.
62 Console.Out.WriteLine(
"Selecting all the people in 'Person' table who live in Africa...");
64 IDbCommand command = Connection.CreateCommand();
65 command.CommandText =
"SELECT name FROM Person WHERE lives_in = 'Africa' ORDER BY name";
67 IDataReader reader = command.ExecuteReader();
68 Console.Out.WriteLine(
"All people that live in Africa:");
69 while (reader.Read()) {
70 Console.Out.WriteLine(
" " + reader.GetString(0));
72 Console.Out.WriteLine();
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb-nunit/Deveel.Data/QueryTest.cs