Skip to content

Commit 2500e1b

Browse files
feat: add fields holding the actual resolved table
Signed-off-by: Andreas Reichel <[email protected]>
1 parent b8c0ed5 commit 2500e1b

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

src/main/java/net/sf/jsqlparser/schema/Column.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public class Column extends ASTNodeAccessImpl implements Expression, MultiPartNa
2929
private ArrayConstructor arrayConstructor;
3030
private String tableDelimiter = ".";
3131

32+
// holds the physical table when resolved against an actual schema information
33+
private Table resolvedTable = null;
34+
3235
public Column() {}
3336

3437
public Column(Table table, String columnName) {
@@ -223,4 +226,24 @@ public String getCommentText() {
223226
public void setCommentText(String commentText) {
224227
this.commentText = commentText;
225228
}
229+
230+
/**
231+
* Gets the actual table when resolved against a physical schema information.
232+
*
233+
* @return the actual table when resolved against a physical schema information
234+
*/
235+
public Table getResolvedTable() {
236+
return resolvedTable;
237+
}
238+
239+
/**
240+
* Sets resolved table.
241+
*
242+
* @param resolvedTable the resolved table
243+
* @return this column
244+
*/
245+
public Column setResolvedTable(Table resolvedTable) {
246+
this.resolvedTable = resolvedTable;
247+
return this;
248+
}
226249
}

src/main/java/net/sf/jsqlparser/schema/Table.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public class Table extends ASTNodeAccessImpl implements FromItem, MultiPartName
5656

5757
private SQLServerHints sqlServerHints;
5858

59+
// holds the physical table when resolved against an actual schema information
60+
private Table resolvedTable = null;
61+
5962
public Table() {}
6063

6164
/**
@@ -400,4 +403,24 @@ public List<String> getNameParts() {
400403
public List<String> getNamePartDelimiters() {
401404
return partDelimiters;
402405
}
406+
407+
/**
408+
* Gets the actual table when resolved against a physical schema information.
409+
*
410+
* @return the actual table when resolved against a physical schema information
411+
*/
412+
public Table getResolvedTable() {
413+
return resolvedTable;
414+
}
415+
416+
/**
417+
* Sets resolved table.
418+
*
419+
* @param resolvedTable the resolved table
420+
* @return this table
421+
*/
422+
public Table setResolvedTable(Table resolvedTable) {
423+
this.resolvedTable = resolvedTable;
424+
return this;
425+
}
403426
}

0 commit comments

Comments
 (0)