001package gudusoft.gsqlparser.dlineage.dataflow.model; 002 003import gudusoft.gsqlparser.TCustomSqlStatement; 004import gudusoft.gsqlparser.nodes.TObjectName; 005 006public class Variable extends Table { 007 008 /** 009 * True when this record's field columns were materialized from its TYPE 010 * declaration, in declaration order (#695). Ordinal pairing (FETCH, 011 * SELECT INTO) is only sound against this order — fields discovered from 012 * consumption arrive in reference order and must not be paired by 013 * position. 014 */ 015 private boolean typeOrderedFields = false; 016 017 public boolean isTypeOrderedFields() { 018 return typeOrderedFields; 019 } 020 021 public void setTypeOrderedFields(boolean typeOrderedFields) { 022 this.typeOrderedFields = typeOrderedFields; 023 } 024 025 /** 026 * The table this record was declared as a row of ({@code v t%ROWTYPE}), else null. Its fields are that table's 027 * columns in the table's order, so a record INSERT into that same table fills each column from the field of the 028 * column's name. 029 */ 030 private Table rowTypeAnchor; 031 032 public Table getRowTypeAnchor() { 033 return rowTypeAnchor; 034 } 035 036 public void setRowTypeAnchor(Table rowTypeAnchor) { 037 this.rowTypeAnchor = rowTypeAnchor; 038 } 039 040 public Variable(TObjectName cursorVariable) { 041 super(cursorVariable); 042 this.setVariable(true); 043 } 044 045 public Variable(String cursorVariable) { 046 super(cursorVariable); 047 this.setVariable(true); 048 } 049 050 public Variable(TCustomSqlStatement stmt, TObjectName cursorVariable) { 051 super(stmt, cursorVariable); 052 this.setVariable(true); 053 } 054} 055