コード例 #1
0
        public virtual void Can_add_comment_to_column()
        {
            string sql = _dialect.GetAddCommentToColumnSql(TABLE_NAME, "col1", "this is a comment");

            AssertSql.AreEqual(GetResultFor_Can_add_comment_to_column(), sql);
        }
コード例 #2
0
 public void Can_drop_table()
 {
     string[] sqls = _dialect.GetDropTableSqls("myTable");
     AssertSql.AreEqual(GetResultFor_Can_drop_table(), sqls);
 }
コード例 #3
0
        public void Can_create_index_with_multiple_columns_sql()
        {
            string sql = _dialect.GetCreateIndexSql("indexName", TABLE_NAME, "col1", "col2", "col3");

            AssertSql.AreEqual("create index indexName on myTable (col1, col2, col3)", sql);
        }
コード例 #4
0
        public void Can_drop_index_sql()
        {
            string sql = _dialect.GetDropIndexSql("indexName", "foo");

            AssertSql.AreEqual(GetResutFor_Can_drop_index_sql(), sql);
        }
コード例 #5
0
        public void Can_order_by_ascending_with_multiple_columns_sql()
        {
            string sql = _dialect.GetOrderBySql(OrderBy.Ascending("col1"), OrderBy.Ascending("col2"));

            AssertSql.AreEqual("order by col1, col2", sql);
        }
コード例 #6
0
        public void Can_create_index_sql()
        {
            string sql = _dialect.GetCreateIndexSql("index", TABLE_NAME, "col1");

            AssertSql.AreEqual("create index index on myTable (col1)", sql);
        }
コード例 #7
0
        public void Can_generate_count_sql()
        {
            string sql = _dialect.GetCountSql(TABLE_NAME);

            AssertSql.AreEqual(GetResultFor_Can_generate_count_sql(), sql);
        }
コード例 #8
0
        public void Can_order_by_ascending_sql()
        {
            string sql = _dialect.GetOrderBySql(OrderBy.Ascending("col1"));

            AssertSql.AreEqual("order by col1", sql);
        }
コード例 #9
0
        public void Can_generate_select_all_sql()
        {
            string sql = _dialect.GetSelectSql(new[] { TABLE_NAME }, new[] { "*" });

            AssertSql.AreEqual(GetSelectAllSql(), sql);
        }
コード例 #10
0
        public void Can_create_check_if_table_exists_sql()
        {
            string sql = _dialect.GetTableExistsSql("myTable");

            AssertSql.AreEqual(GetResultFor_Can_create_check_if_table_exists_sql(), sql);
        }
コード例 #11
0
        public virtual void Can_order_by_ascending_and_descending_with_multiple_columns_sql()
        {
            var sql = _dialect.GetOrderBySql(OrderBy.Ascending("col1"), OrderBy.Descending("col2"));

            AssertSql.AreEqual("order by col1, col2 desc", sql);
        }
コード例 #12
0
        public virtual void Can_order_by_descending_sql()
        {
            var sql = _dialect.GetOrderBySql(OrderBy.Descending("col1"));

            AssertSql.AreEqual("order by col1 desc", sql);
        }
コード例 #13
0
        public virtual void Can_create_check_if_table_exists_in_schema_sql()
        {
            var sql = _dialect.GetTableExistsSql("dbo.myTable");

            AssertSql.AreEqual(GetResultFor_Can_create_check_if_table_exists_in_schema_sql("dbo", "myTable"), sql);
        }