// NewPluginReader allows to be easily composed from other readers
NewPluginReader allows to be easily composed from other readers
// NewPluginReader allows to be easily composed from other readers
func NewPluginReader(readers ...Reader) Reader {
	p := PluginReader{}
	for _, i := range readers {
		if r, ok := i.(CatalogReader); ok {
			p.catalogs = r.Catalogs
		}
		if r, ok := i.(SchemaReader); ok {
			p.schemas = r.Schemas
		}
		if r, ok := i.(TableReader); ok {
			p.tables = r.Tables
		}
		if r, ok := i.(ColumnReader); ok {
			p.columns = r.Columns
		}
		if r, ok := i.(IndexReader); ok {
			p.indexes = r.Indexes
		}
		if r, ok := i.(IndexColumnReader); ok {
			p.indexColumns = r.IndexColumns
		}
		if r, ok := i.(TriggerReader); ok {
			p.triggers = r.Triggers
		}
		if r, ok := i.(ConstraintReader); ok {
			p.constraints = r.Constraints
		}
		if r, ok := i.(ConstraintColumnReader); ok {
			p.constraintColumns = r.ConstraintColumns
		}
		if r, ok := i.(FunctionReader); ok {
			p.functions = r.Functions
		}
		if r, ok := i.(FunctionColumnReader); ok {
			p.functionColumns = r.FunctionColumns
		}
		if r, ok := i.(SequenceReader); ok {
			p.sequences = r.Sequences
		}
	}
	return &p
}
func NewPluginReader ( readers ... Reader ) Reader { p := PluginReader { } for _ , i := range readers { if r , ok := i . ( CatalogReader ) ; ok { p . catalogs = r . Catalogs } if r , ok := i . ( SchemaReader ) ; ok { p . schemas = r . Schemas } if r , ok := i . ( TableReader ) ; ok { p . tables = r . Tables } if r , ok := i . ( ColumnReader ) ; ok { p . columns = r . Columns } if r , ok := i . ( IndexReader ) ; ok { p . indexes = r . Indexes } if r , ok := i . ( IndexColumnReader ) ; ok { p . indexColumns = r . IndexColumns } if r , ok := i . ( TriggerReader ) ; ok { p . triggers = r . Triggers } if r , ok := i . ( ConstraintReader ) ; ok { p . constraints = r . Constraints } if r , ok := i . ( ConstraintColumnReader ) ; ok { p . constraintColumns = r . ConstraintColumns } if r , ok := i . ( FunctionReader ) ; ok { p . functions = r . Functions } if r , ok := i . ( FunctionColumnReader ) ; ok { p . functionColumns = r . FunctionColumns } if r , ok := i . ( SequenceReader ) ; ok { p . sequences = r . Sequences } } return & p }
NewPluginReader allows to be easily composed from other readers
NewPluginReader allows to be easily composed from other readers