public void SelectAllColumns() { var query = (SqlQueryExpression) SqlExpression.Parse("SELECT * FROM test_table"); var statement = new SelectStatement(query); ITable result = statement.Execute(Query); Assert.IsNotNull(result); Assert.AreEqual(3, result.RowCount); }
public void SelectAllColumns() { var query = (SqlQueryExpression)SqlExpression.Parse("SELECT * FROM test_table"); var statement = new SelectStatement(query); ITable result = statement.Execute(Query); Assert.IsNotNull(result); Assert.AreEqual(3, result.RowCount); }
public void SelectAliasedWithGroupedExpression() { var query = (SqlQueryExpression)SqlExpression.Parse("SELECT * FROM test_table t0 WHERE (t0.id = 1 AND t0.id <> 0)"); var statement = new SelectStatement(query); var result = statement.Execute(Query); Assert.IsNotNull(result); Assert.AreEqual(1, result.RowCount); }
public void SimpleOrderedSelect() { var query = (SqlQueryExpression) SqlExpression.Parse("SELECT * FROM test_table"); var sort = new[] {new SortColumn(SqlExpression.Reference(new ObjectName("birth_date")), false)}; var statement = new SelectStatement(query, sort); var result = statement.Execute(Query); Assert.IsNotNull(result); Assert.AreEqual(3, result.RowCount); var firstName = result.GetValue(0, 1); Assert.AreEqual("Roger", firstName.Value.ToString()); }
public void SimpleOrderedSelect() { var query = (SqlQueryExpression)SqlExpression.Parse("SELECT * FROM test_table"); var sort = new[] { new SortColumn(SqlExpression.Reference(new ObjectName("birth_date")), false) }; var statement = new SelectStatement(query, sort); var result = statement.Execute(Query); Assert.IsNotNull(result); Assert.AreEqual(3, result.RowCount); var firstName = result.GetValue(0, 1); Assert.AreEqual("Roger", firstName.Value.ToString()); }