• Oracle 中GetDataDictionary()


     /// <summary>
            /// 根据schema和region得到相应的数据字典
            /// </summary>
            /// <returns></returns>
            public DataSet GetDataDictionary(string schema,string datasource)
            {
                DatabaseManager dbMgr = GetDatabaseManager(datasource);
                PreparedStatement sql = new PreparedStatement();

                //string schema = GetSchema();
               
                string name = GetName();

                if (!String.IsNullOrEmpty(schema))
                {
                    sql.SqlText = "select lower(column_name) name, data_type type, nullable,data_scale scale from all_tab_columns where table_name =:table_name and owner= :schema order by column_id";
                    sql.Parameters.Add(new Parameter(":table_name", name.ToUpper(), DbType.AnsiStringFixedLength));
                    sql.Parameters.Add(new Parameter(":schema", schema.ToUpper(), DbType.AnsiStringFixedLength));
                }
                else
                {
                    sql.SqlText = "select lower(column_name) name, data_type type, nullable,data_scale scale from user_tab_columns where table_name = :tablename order by column_id";
                    sql.Parameters.Add(new Parameter(":tablename", name.ToUpper(), DbType.AnsiStringFixedLength));
                }

                DataSet ds = dbMgr.GetDataSet(sql);
                return ds;
            }
  • 相关阅读:
    嵌入式框架Zorb Framework搭建五:事件的实现
    C#网络编程系列文章(五)之Socket实现异步UDP服务器
    C#SocketAsyncEventArgs实现高效能多并发TCPSocket通信 (服务器实现)
    C#中的ManagementClass类
    Etcd v3备份与恢复
    kubernetes调度重平衡工具 Descheduler
    K8S – 优化dns解析时间
    kubernetes备份和恢复
    Coredns部署更新
    认识Kubernetes Descheduler
  • 原文地址:https://www.cnblogs.com/relang99/p/666848.html
Copyright © 2020-2023  润新知