In the past years, we’ve invested a lot of effort into improving our procedural language capabilities in jOOQ. What started with a simple internal API to support the emulations of DDL clauses like these:
SQL
x
26
1
-- Some dialect that supports this2
create table if not exists t (i varchar(10));3
4
-- Db25
begin6
declare continue handler for sqlstate '42710' begin end;7
execute immediate 'create table T (I varchar(10))';8
end9
10
-- Oracle11
begin12
execute immediate 'create table T (I varchar2(10))';13
exception14
when others then15
if sqlerrm like 'ORA-00955%' then null;16
else raise;17
end if;18
end;19
20
-- SQL Server21
begin try22
create table T (I varchar(10))23
end try24
begin catch25
if error_number() != 2714 throw;26
end catchfrom DZone.com Feed https://ift.tt/3b9UbvV
No comments:
Post a Comment