You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/site/sphinx/usage.rst
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -231,6 +231,27 @@ The fastest way to learn the object model is to look at it. Paste your SQL into
231
231
Read that as a map: each line is a getter away. ``select.getSelectItems()``, ``select.getFromItem()``, ``select.getWhere()``. Once the tree gets deeper than a couple of levels, stop casting by hand and use :ref:`Use the Visitor Patterns`.
232
232
233
233
234
+
DROP INDEX owners
235
+
-----------------
236
+
237
+
``DROP INDEX ix ON app.t`` exposes ``app.t`` through ``Drop.getTable()``;
238
+
``getName()`` continues to identify the index. The owner is populated for the
239
+
single-index ON form used by MySQL and SQL Server. A DROP INDEX without ON,
240
+
as in PostgreSQL, has a null owner: resolving the index's table requires a catalog.
241
+
SQL Server's multi-owner list and WITH options are outside this extension.
242
+
243
+
``getParameters()`` includes ON and the rendered table as a legacy token snapshot
244
+
when a structured owner exists. Mutate ``getTable()`` or use ``setTable()`` to
245
+
update the owner; ``addParameters()`` appends options without losing it.
246
+
``setTable(null)`` removes ON, while ``setParameters()`` replaces the entire
247
+
parameter clause with raw tokens and clears the structured owner. Raw parameter
248
+
setters do not parse SQL or infer a table.
249
+
250
+
Table discovery and statement visitors traverse DROP TABLE/VIEW targets and
251
+
explicit index owners, without reporting catalog-only object names as tables.
252
+
The statement deparser delegates real tables to its configured select deparser.
253
+
MySQL ALGORITHM/LOCK tokens retain their order and optional equals signs.
0 commit comments