29 lines
508 B
Go
29 lines
508 B
Go
package sqlite
|
|
|
|
const (
|
|
queryListPackage = `
|
|
select
|
|
id,
|
|
name,
|
|
url,
|
|
comments
|
|
--modules,
|
|
--issues,
|
|
from package;
|
|
`
|
|
queryAddComment = `
|
|
insert into comment(text) values ($1) ;
|
|
update package
|
|
set comments = json_insert(comments, '$[#]', ( select last_insert_rowid() as id from comment ))
|
|
where id = $2 ;
|
|
`
|
|
queryAddPackage = `
|
|
insert into package(name, url, modules) values ($1, $2, $3);
|
|
`
|
|
queryInsMsgGetIDs = `
|
|
insert into module(name, version, last_version) values
|
|
%s
|
|
returning id;
|
|
`
|
|
)
|