[fix]Config创建默认配置文件的开关Runtime.CreateConfigOnMissing,仅需对自动创建生效,而不应该阻止用户主动Save
智能大石头 authored at 2024-08-09 00:30:41 石头 committed at 2024-08-10 14:22:24
1.89 KiB
X
using System;
using System.Collections.Generic;
using System.ComponentModel;
using NewLife;

namespace XCode.DataAccessLayer
{
    /// <summary>数据库元数据接口</summary>
    public interface IMetaData : IDisposable2
    {
        #region 属性
        /// <summary>数据库</summary>
        IDatabase Database { get; }

        /// <summary>所有元数据集合</summary>
        ICollection<String> MetaDataCollections { get; }

        /// <summary>保留关键字</summary>
        ICollection<String> ReservedWords { get; }
        #endregion

        #region 构架
        /// <summary>取得表模型,正向工程</summary>
        /// <returns></returns>
        List<IDataTable> GetTables();

        ///// <summary>设置表模型,检查数据表是否匹配表模型,反向工程</summary>
        ///// <param name="tables"></param>
        //[EditorBrowsable(EditorBrowsableState.Never)]
        //[Obsolete("请改用多参数版本!")]
        //void SetTables(params IDataTable[] tables);

        /// <summary>设置表模型,检查数据表是否匹配表模型,反向工程</summary>
        /// <param name="setting">设置</param>
        /// <param name="tables"></param>
        void SetTables(NegativeSetting setting, params IDataTable[] tables);

        /// <summary>获取数据定义语句</summary>
        /// <param name="schema">数据定义模式</param>
        /// <param name="values">其它信息</param>
        /// <returns>数据定义语句</returns>
        String GetSchemaSQL(DDLSchema schema, params Object[] values);

        /// <summary>设置数据定义模式</summary>
        /// <param name="schema">数据定义模式</param>
        /// <param name="values">其它信息</param>
        /// <returns></returns>
        Object SetSchema(DDLSchema schema, params Object[] values);
        #endregion
    }
}