sql formatting
This commit is contained in:
parent
f7f509c70d
commit
97b4c2124c
@ -1,4 +1,3 @@
|
||||
insert
|
||||
or replace into tags (id, name, usn, config)
|
||||
values
|
||||
(?, ?, ?, ?)
|
||||
INSERT
|
||||
OR REPLACE INTO tags (id, name, usn, config)
|
||||
VALUES (?, ?, ?, ?)
|
@ -1,13 +1,10 @@
|
||||
select
|
||||
case
|
||||
when ?1 in (
|
||||
select
|
||||
id
|
||||
from tags
|
||||
) then (
|
||||
select
|
||||
max(id) + 1
|
||||
from tags
|
||||
)
|
||||
else ?1
|
||||
end;
|
||||
SELECT CASE
|
||||
WHEN ?1 IN (
|
||||
SELECT id
|
||||
FROM tags
|
||||
) THEN (
|
||||
SELECT max(id) + 1
|
||||
FROM tags
|
||||
)
|
||||
ELSE ?1
|
||||
END;
|
@ -1,7 +1,7 @@
|
||||
drop table tags;
|
||||
create table tags (
|
||||
id integer primary key not null,
|
||||
name text not null collate unicase,
|
||||
usn integer not null,
|
||||
config blob not null
|
||||
DROP TABLE tags;
|
||||
CREATE TABLE tags (
|
||||
id integer PRIMARY KEY NOT NULL,
|
||||
name text NOT NULL COLLATE unicase,
|
||||
usn integer NOT NULL,
|
||||
config blob NOT NULL
|
||||
);
|
Loading…
Reference in New Issue
Block a user