13.07.2015 Views

Caché Upgrade Checklists - InterSystems Documentation

Caché Upgrade Checklists - InterSystems Documentation

Caché Upgrade Checklists - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Developers2.2.7.3 Changes In Storage Methods Associated With SQLStorageInternal methods generated by the compiler for classes that use <strong>Caché</strong> SQLStorage were not properly NEWing some %-variables used by SQL code. These methods will now NEW %msg, %ok, and %ROWCOUNT; %ROWID and SQLCODEwere being properly NEWed.Applications that make use of the fact that these variables were getting “left behind” will have to be changed.2.2.7.4 Trigger Definition EnhancementsChanges have been made to SQL triggers to make {field} references perform better now that <strong>Caché</strong> supports trigger eventsof multiple types. The code generated by a trigger will now only be emitted one time, even if the trigger had more than oneevent. In order to make this change possible, the rules regarding the behavior of {Field*Flag} references are now as follows:• {Field}:– For INSERT, resolves to the value inserted for the column.– For DELETE, resolves to the on-disk, pre-delete value for the column.– For UPDATE, resolves to the new value the column is being updated to.• {Field*N}:– For INSERT, resolves to the value inserted for the column.– For DELETE, resolves to the on-disk value for the column from the row being deleted.– For UPDATE, resolves to the new value being updated for the column in this row.• {Field*O}:– For INSERT, resolves to NULL. This is new behavior.– For DELETE, resolves to the on-disk value for the column from the row being deleted.– For UPDATE, resolves to the old value for the column being updated.• {Field*C}:– For INSERT, TRUE if the inserted value is non-NULL, otherwise FALSE. This is new behavior.– For DELETE, TRUE if the value being deleted is non-NULL, otherwise FALSE. This is new behavior.– For UPDATE, TRUE if the new value differs from the old/on-disk value, otherwise FALSE.Furthermore, the following also applies to Trigger code: Triggers may contain line labels. However, the trigger code isgenerated outside the scope of any procedure blocks. This means the label must be unique in the class definition. Any othercode compiled into the class must not have the same label defined, including code in other triggers, non-procedureblockmethods, SqlCompute code, and so on.2.2.7.5 TSQL: UPDATE STATISTICSThe <strong>Caché</strong> TSQL compiler now supports the UPDATE STATISTICS statement; it generates a call to $SYS-TEM.SQL.TuneTable() for the it. This statement is also supported as a dynamic statement.2.2.7.6 Change Processing Of Non-%ObjectSelectMode Select StatementsThe result of executing a dynamic SQL statement is a result object. This result object may be a simple result (indicatingsuccess or failure), a result set object, or a procedure result object. If the statement was prepared with %ObjectSelectMode<strong>Caché</strong> <strong>Upgrade</strong> <strong>Checklists</strong> 27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!