File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/main/java/net/sf/jsqlparser/schema Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,28 @@ public Column(String columnName) {
36
36
this (null , columnName );
37
37
}
38
38
39
+ /**
40
+ * Retrieve the information regarding the {@code Table} this {@code Column} does
41
+ * belong to, if any can be inferred.
42
+ * <p>
43
+ * The inference is based only on local information, and not on the whole SQL command.
44
+ * For example, consider the following query:
45
+ * <blockquote><pre>
46
+ * SELECT x FROM Foo
47
+ * </pre></blockquote>
48
+ * Given the {@code Column} called {@code x}, this method would return {@code null},
49
+ * and not the info about the table {@code Foo}.
50
+ * On the other hand, consider:
51
+ * <blockquote><pre>
52
+ * SELECT t.x FROM Foo t
53
+ * </pre></blockquote>
54
+ * Here, we will get a {@code Table} object for a table called {@code t}.
55
+ * But because the inference is local, such object will not know that {@code t} is
56
+ * just an alias for {@code Foo}.
57
+ *
58
+ * @return an instance of {@link net.sf.jsqlparser.schema.Table} representing the
59
+ * table this column does belong to, if it can be inferred. Can be {@code null}.
60
+ */
39
61
public Table getTable () {
40
62
return table ;
41
63
}
You can’t perform that action at this time.
0 commit comments