Removed old fields

This commit is contained in:
Magnus Åhall 2026-06-10 18:21:30 +02:00
parent 8a22cf569f
commit 31eee4ede5
2 changed files with 133 additions and 6 deletions

10
node.go
View file

@ -54,7 +54,6 @@ type Node struct {
DeletedSeq sql.NullInt64 `db:"deleted_seq"`
Content string
ContentEncrypted string `db:"content_encrypted" json:"-"`
Markdown bool
}
func NodeTree(userID, offset int, synced uint64) (nodes []TreeNode, maxSeq uint64, moreRowsExist bool, err error) { // {{{
@ -75,7 +74,7 @@ func NodeTree(userID, offset int, synced uint64) (nodes []TreeNode, maxSeq uint6
public.node
WHERE
user_id = $1 AND
NOT history AND (
(
created_seq > $4 OR
updated_seq > $4 OR
deleted_seq > $4
@ -132,14 +131,13 @@ func Nodes(userID, offset int, synced uint64, clientUUID string) (nodes []Node,
updated_seq,
deleted_seq,
content,
content_encrypted,
markdown
content_encrypted
FROM
public.node
WHERE
user_id = $1 AND
client != $5::uuid AND
NOT history AND (
(
created_seq > $4 OR
updated_seq > $4 OR
deleted_seq > $4
@ -192,7 +190,7 @@ func NodesCount(userID int, synced uint64, clientUUID string) (count int, err er
WHERE
user_id = $1 AND
client != $3 AND
NOT history AND (
(
created_seq > $2 OR
updated_seq > $2 OR
deleted_seq > $2