SERIAL emulation with SQL Server

The SERIAL and BIGSERIAL types can be emulated with triggers and sequences when using SQL Server 2012 and higher.

By default when using SQL Server, the SERIAL and BIGSERIAL types are emulated with IDENTITY columns. This native sequence generator is the fastest and preferred solution. However, it requires removing the serial column in all INSERT statements, which can lead to a large change in your legacy code.

Until version 3.00, it was possible to workaround this limitation by using the "regtable" serial emulation. But this solution required using a dedicated SERIALREG table that needed to be updated for each INSERT statement. This resulted in poor performances, when concurrent programs create rows in the same tables (locking issues in SERIALREG).

Starting with Genero 3.00, it is now possible to use a serial emulation based on triggers and sequences. Sequences were introduced in SQL Server version 2012, so you need at least a 2012 server in order to use this emulation:

dbi.database.mydb.ifxemul.datatype.serial.emulation = "trigseq"