Example #1
0
        private Table LoadFromSchema()
        {
            // todo 判断是否存在表,表不存在时返回null
            List <IColumn> cols = QuerySession.ExecuteSqlString(QuerySession.DatabaseInfo.SqlDialect.SchemaSql, new PropertyEqualColumnMapper <Column>(), tableName).Cast <IColumn>().ToList();

            if (cols.Count == 0)
            {
                return(null);
            }
            var table = new Table(cols);

            table.TableName = tableName;
            return(table);
        }