Using of “Instead-of” triggers

Such kind of trigger may be applied to views only. It could be used for insert, update and delete operations as usual.

Example:

CREATE TRIGGER trigger1
INSTEAD OF INSERT ON v1
FOR EACH ROW
BEGIN
INSERT INTO t2 VALUES( 1 );
END ;

“trigger1” will be fired on attempt to insert record in the view “v1”.
Starting from v 4.1 you may use ‘NEW’ and ‘OLD’ descriptors within this kind of trigger.
Views are always read-only – so using the trigger is a nature way to overcome this restriction.

Example:

CREATE TABLE t1 (f1 LONG, f2 TEXT(1024));
CREATE VIEW v1 AS SELECT * FROM t1;
CREATE TRIGGER trigger1
INSTEAD OF INSERT ON v1
FOR EACH ROW
BEGIN
INSERT INTO t1 VALUES( NEW.f1, NEW.f2 );
END ;


INSERT INTO v1 VALUES ( 1, ‘abc’);

SELECT * FROM v1;
————-
f1 f2
————-
1 abc
————-

Improved work with TIFF format for VPicture field.

On request of Marc Schmitt, Kirill have improve work with TIFF format.

1) V4MD 4.0 was the single ADK, which did not allow specify format of picture in the VPicture.WriteAs() method. This problem fixed and now its is possible specify format as #kJPG, #kTIFF

2) But Marc did want more: he want to have SEVERAL compression methods for TIFF. We have look around and have found that TIFF compression do not use CompressionRate (1..100) as do JPG, instead it can specify kind of compression.

To not change existed API, we have decide to use parameter “INT inCompressionRate” to send compression kind also for TIFF.

3) One more fix was made — in the KERNEL itself — to pass compression kind into PAINTLIB.

4) For all other ADKs e.g. V4RB now also possible to use TIFF with compression, it needs just specify kind of compression in the 3d parameter. See WIKI docs for numeric constants. We are lazy so far to provide these constants into each Valentina ADK. So it will be good idea if you in your code will make self symbolic constant around number. Future we will provide such constants also self.

Reports on linux now much faster (10+ times)!

Igor have made great job improving speed of reports generation on linux, which uses the FreeType library (instead of wxWidgets+OS like on WIN/MAC). As result, time of report of one developer go down from 3 second to 0.3.

Actually FreeType library can be used on MAC and WIN. Just no big sense because it was much slower.

Now we see sense to enable TWO render-engines on MAC/WIN and be able switch them runtime. This will be useful for building of automated test-system for reports.

RAISE now can re-throw exception

Up to now the statement RAISE did have syntax as: 
     raise errNumber [, errMsg]

Now it is 
     raise [errNumber [, errMsg]]

Except syntax also is implemented additional logic:
     raise without parameters means throw the same exception forward.

BEGIN
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(1);
EXCEPTION
WHEN 23503 THEN
PRINT 'Unique violation'
RAISE;
END;