Unverified Commit d36a572c authored by Kevin Lyda's avatar Kevin Lyda
Browse files

Permanent messages are permanent...

Sigh.  Boolean errors strike again.
parent 7410cef1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -20,9 +20,6 @@ Switch between MAIL and BULLETIN modes? MAIL commands are documented

## Things to do

  * Remove all file related things.  Which means no need for most
    (all?) /EDIT flags
  * Stop the seeded messages from being deleted by the expire batch command.
  * Run [godoc](http://localhost:6060/) and then review where the help text is lacking.
  * Implement each command.
    * Next: folder commands - MODIFY
@@ -69,6 +66,9 @@ Done:
    * ~~Remove BBOARD references.~~
    * ~~format with `par w72j1`~~
  * ~~Handle MARK for SELECT and DIRECTORY.~~
  * ~~Remove all file related things.  Which means no need for most
    (all?) /EDIT flags~~
  * ~~Stop the seeded messages from being deleted by the expire batch command.~~

## Module links

+2 −2
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ import (

const deleteAllExpiredMessages = `-- name: DeleteAllExpiredMessages :execrows
DELETE FROM messages
WHERE permanent != 0 AND expiration < CURRENT_TIMESTAMP
WHERE permanent != 1 AND expiration < CURRENT_TIMESTAMP
`

func (q *Queries) DeleteAllExpiredMessages(ctx context.Context) (int64, error) {
@@ -24,7 +24,7 @@ func (q *Queries) DeleteAllExpiredMessages(ctx context.Context) (int64, error) {

const deleteAllShutdownMessages = `-- name: DeleteAllShutdownMessages :execrows
DELETE FROM messages
WHERE permanent != 0 AND shutdown > 0
WHERE permanent != 1 AND shutdown > 0
`

func (q *Queries) DeleteAllShutdownMessages(ctx context.Context) (int64, error) {
+2 −2
Original line number Diff line number Diff line
-- name: DeleteAllExpiredMessages :execrows
DELETE FROM messages
WHERE permanent != 0 AND expiration < CURRENT_TIMESTAMP;
WHERE permanent != 1 AND expiration < CURRENT_TIMESTAMP;

-- name: DeleteAllShutdownMessages :execrows
DELETE FROM messages
WHERE permanent != 0 AND shutdown > 0;
WHERE permanent != 1 AND shutdown > 0;