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) {
3636 this (null , columnName );
3737 }
3838
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+ */
3961 public Table getTable () {
4062 return table ;
4163 }
You can’t perform that action at this time.
0 commit comments