예제 #1
0
        public void CanGetTableDdlByName()
        {
            var tableName = "Author";

            using (var conn = Processor.Connection)
            {
                using (var cmd = conn.CreateCommand())
                {
                    cmd.CommandText = CreateTableSql;
                    cmd.ExecuteNonQuery();
                }
                var schema   = new SqliteSchemaDumper(Processor, new TextWriterAnnouncer(System.Console.Out));
                var tableDDL = schema.GetTableDDL(tableName);

                Assert.IsFalse(string.IsNullOrEmpty(tableDDL));
                Assert.IsTrue(SqliteSchemaDumper.HasValidSimpleTableDDL(ref tableDDL));
            }
        }