Package dev.frostlake.executor
Class DmlWriteTarget
java.lang.Object
dev.frostlake.executor.DmlWriteTarget
The envelope live wraps a DML write failure in —
DML operation to table T failed on column C
with error: … — around whatever sentence the value itself earned.
★ THE ENVELOPE IS THE DML LAYER'S, NOT THE VALUE'S. The same
SELECT COALESCE(va, d) FROM vf that a CTAS wraps is answered bare when written on its own,
so it belongs to the statement writing the rows rather than to the conversion that failed.
★ HOW THE TABLE IS NAMED DEPENDS ON THE STATEMENT. A CTAS always spells it FULLY QUALIFIED, even when the CREATE named it bare; every other DML echoes the name the statement wrote, upper-cased. Both live-measured in one run. Only the CTAS half is applied here so far — see the task list for the written-name half, which needs the spelling threaded down from each handler.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RuntimeExceptionfailedOnColumn(String table, String column, RuntimeException failure) static booleanisRowTimeFailure(RuntimeException failure) Whether a failure belongs INSIDE the envelope.
-
Method Details
-
isRowTimeFailure
Whether a failure belongs INSIDE the envelope. A COMPILATION refusal does not: live answersCREATE TABLE t AS SELECT NOSUCHFN(x) …with the bare "SQL compilation error" sentence, because the statement never got far enough to write anything. Only a failure raised while VALUES were being produced is a DML failure, and those carry no prefix at all — which is what makes the prefix the discriminator rather than a list of sentences.- Parameters:
failure- the failure- Returns:
- true when the envelope applies
-
failedOnColumn
public static RuntimeException failedOnColumn(String table, String column, RuntimeException failure) - Parameters:
table- the table as it should be namedcolumn- the column the failure is attributed tofailure- the inner failure, whose sentence is kept verbatim- Returns:
- the wrapped refusal
-