コード例 #1
0
        public static void GenerateInsertFixedData(ITableSource table, TextWriter tw, ISqlDialect dialect)
        {
            ITableStructure ts  = table.LoadTableStructure(TableStructureMembers.All);
            ISqlDumper      dmp = dialect.CreateDumper(tw);

            GenerateInsertFixedData(dmp, ts);
        }
コード例 #2
0
        protected override void DoGetChildren()
        {
            List <ITreeNode> res   = new List <ITreeNode>();
            ITableStructure  table = m_conn.LoadTableStructure(TableStructureMembers.Columns | TableStructureMembers.PrimaryKey | TableStructureMembers.ForeignKeys);

            foreach (IColumnStructure col in table.Columns)
            {
                res.Add(new Column_TreeNode(m_conn, table, col, this));
            }
            m_children = res.ToArray();
        }
コード例 #3
0
        protected override void DoGetChildren()
        {
            List <ITreeNode> res   = new List <ITreeNode>();
            ITableStructure  table = m_conn.LoadTableStructure(TableStructureMembers.ColumnNames);
            var pers = TablePerspectiveManager.GetPerspectives(m_conn.Connection, m_conn.Database.DatabaseName, m_conn.FullName, table.Columns.GetNames());

            foreach (var per in pers)
            {
                res.Add(new PerspectiveInstanceTreeNode(this, m_conn, per));
            }
            m_children = res.ToArray();
        }
コード例 #4
0
        public static ITableStructure InvokeLoadStructure(this ITableSource table, TableStructureMembers members)
        {
            IPhysicalConnection conn = table.Connection;

            if (conn == null)
            {
                return(table.LoadTableStructure(members));
            }
            IAsyncResult async = conn.BeginInvoke((Func <TableStructureMembers, ITableStructure>)table.LoadTableStructure, null, members);

            Async.WaitFor(async);
            return((ITableStructure)conn.EndInvoke(async));
        }
コード例 #5
0
        protected override void DoGetChildren()
        {
            List <ITreeNode> res   = new List <ITreeNode>();
            ITableStructure  table = m_conn.LoadTableStructure(TableStructureMembers.ConstraintsNoRefs);

            foreach (IConstraint con in table.Constraints.Sorted())
            {
                if (!m_filterFunc(con))
                {
                    continue;
                }
                res.Add(new Constraint_TreeNode(m_conn, table, con, this));
            }
            m_children = res.ToArray();
        }
コード例 #6
0
        public static ITableStructure CGetStructure(this ITableSource table, PriorityLevel priority, bool behaveAsStack, Action guiCallback)
        {
            IPhysicalConnection conn = table.Connection;
            string key = CGetStructureKey(table);

            return((ITableStructure)conn.CacheGet(priority, behaveAsStack, key, () => table.LoadTableStructure(TableStructureMembers.All), guiCallback));
        }