public DataTable GetSchema(string collectionName, string[] restrictionValues = null)
        {
            DatabaseSchemaNode     dbNode     = null;
            DatabaseListSchemaNode dbListNode = null;
            DbSchemaBaseNode       node       = this;

            while (node != null)
            {
                if (dbNode == null && node is DatabaseSchemaNode dbSchemaNode)
                {
                    dbNode = dbSchemaNode;
                }
                else if (dbListNode == null && node is DatabaseListSchemaNode dbListSchemaNode)
                {
                    dbListNode = dbListSchemaNode;
                }

                node = node.ParentNode;
            }

            if (dbListNode != null)
            {
                return(dbListNode.GetSchema(dbNode?.Text, collectionName, restrictionValues));
            }

            return(null);
        }
        public T FindParentNode <T>() where T : DbSchemaBaseNode
        {
            DbSchemaBaseNode result = this;

            while (result != null)
            {
                if (result is T t)
                {
                    return(t);
                }

                result = result.ParentNode;
            }

            return(null);
        }
 public IndexColumnSchemaNode(DbSchemaBaseNode parentNode) : base(parentNode)
 {
 }
 public IndexListSchemaNode(DbSchemaBaseNode parentNode) : base(parentNode)
 {
 }
 public ColumnListSchemaNode(DbSchemaBaseNode parentNode) : base(parentNode)
 {
 }
 public StoredProcedureParameterSchemaNode(DbSchemaBaseNode parentNode) : base(parentNode)
 {
 }
 public FunctionParameterSchemaNode(DbSchemaBaseNode parentNode) : base(parentNode)
 {
 }
 public FunctionSchemaNode(DbSchemaBaseNode parentNode) : base(parentNode)
 {
 }
 public TableSchemaNode(DbSchemaBaseNode parentNode) : base(parentNode)
 {
 }
Ejemplo n.º 10
0
 public StoredProceduresListSchemaNode(DbSchemaBaseNode parentNode) : base(parentNode)
 {
 }
Ejemplo n.º 11
0
 public DatabaseSchemaNode(DbSchemaBaseNode parentNode) : base(parentNode)
 {
 }
Ejemplo n.º 12
0
 public DbSchemaBaseNode(DbSchemaBaseNode parentNode)
 {
     _ParentNode = parentNode;
 }