SQLite stubs
This commit is contained in:
parent
d11c243599
commit
c1dcd5b218
|
@ -18,6 +18,7 @@ package sqlite3
|
|||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/matrix-org/dendrite/internal"
|
||||
|
@ -111,3 +112,9 @@ func (s *eventJSONStatements) BulkSelectEventJSON(
|
|||
}
|
||||
return results[:i], nil
|
||||
}
|
||||
|
||||
func (s *eventJSONStatements) PurgeEventJSONs(
|
||||
ctx context.Context, txn *sql.Tx, roomNID types.RoomNID,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented on SQLite")
|
||||
}
|
||||
|
|
|
@ -646,3 +646,9 @@ func (s *eventStatements) SelectEventRejected(
|
|||
err = stmt.QueryRowContext(ctx, roomNID, eventID).Scan(&rejected)
|
||||
return
|
||||
}
|
||||
|
||||
func (s *eventStatements) PurgeEvents(
|
||||
ctx context.Context, txn *sql.Tx, roomNID types.RoomNID,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented on SQLite")
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ package sqlite3
|
|||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/matrix-org/dendrite/internal"
|
||||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||
|
@ -158,3 +159,9 @@ func (s *inviteStatements) SelectInviteActiveForUserInRoom(
|
|||
}
|
||||
return result, eventIDs, nil
|
||||
}
|
||||
|
||||
func (s *inviteStatements) PurgeInvites(
|
||||
ctx context.Context, txn *sql.Tx, roomNID types.RoomNID,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented on SQLite")
|
||||
}
|
||||
|
|
|
@ -407,3 +407,9 @@ func (s *membershipStatements) DeleteMembership(
|
|||
)
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *membershipStatements) PurgeMemberships(
|
||||
ctx context.Context, txn *sql.Tx, roomNID types.RoomNID,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented on SQLite")
|
||||
}
|
||||
|
|
|
@ -129,3 +129,9 @@ func (s *previousEventStatements) SelectPreviousEventExists(
|
|||
stmt := sqlutil.TxStmt(txn, s.selectPreviousEventExistsStmt)
|
||||
return stmt.QueryRowContext(ctx, eventID, eventReferenceSHA256).Scan(&ok)
|
||||
}
|
||||
|
||||
func (s *previousEventStatements) PurgePreviousEvents(
|
||||
ctx context.Context, txn *sql.Tx, roomNID types.RoomNID,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented on SQLite")
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ package sqlite3
|
|||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/matrix-org/dendrite/internal"
|
||||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||
|
@ -106,3 +107,9 @@ func (s *publishedStatements) SelectAllPublishedRooms(
|
|||
}
|
||||
return roomIDs, rows.Err()
|
||||
}
|
||||
|
||||
func (s *publishedStatements) PurgePublished(
|
||||
ctx context.Context, txn *sql.Tx, roomID string,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented on SQLite")
|
||||
}
|
||||
|
|
|
@ -17,9 +17,11 @@ package sqlite3
|
|||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||
"github.com/matrix-org/dendrite/roomserver/storage/tables"
|
||||
"github.com/matrix-org/dendrite/roomserver/types"
|
||||
)
|
||||
|
||||
const redactionsSchema = `
|
||||
|
@ -121,3 +123,9 @@ func (s *redactionStatements) MarkRedactionValidated(
|
|||
_, err := stmt.ExecContext(ctx, validated, redactionEventID)
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *redactionStatements) PurgeRedactions(
|
||||
ctx context.Context, txn *sql.Tx, roomNID types.RoomNID,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented on SQLite")
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ package sqlite3
|
|||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/matrix-org/dendrite/internal"
|
||||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||
|
@ -143,3 +144,9 @@ func (s *roomAliasesStatements) DeleteRoomAlias(
|
|||
_, err := stmt.ExecContext(ctx, alias)
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *roomAliasesStatements) PurgeRoomAliases(
|
||||
ctx context.Context, txn *sql.Tx, roomID string,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented on SQLite")
|
||||
}
|
||||
|
|
|
@ -141,3 +141,9 @@ func (s *stateBlockStatements) BulkSelectStateBlockEntries(
|
|||
}
|
||||
return results, err
|
||||
}
|
||||
|
||||
func (s *stateBlockStatements) PurgeStateBlocks(
|
||||
ctx context.Context, txn *sql.Tx, roomNID types.RoomNID,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented on SQLite")
|
||||
}
|
||||
|
|
|
@ -146,3 +146,9 @@ func (s *stateSnapshotStatements) BulkSelectStateForHistoryVisibility(
|
|||
) ([]types.EventNID, error) {
|
||||
return nil, tables.OptimisationNotSupportedError
|
||||
}
|
||||
|
||||
func (s *stateSnapshotStatements) PurgeStateSnapshots(
|
||||
ctx context.Context, txn *sql.Tx, roomNID types.RoomNID,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented on SQLite")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue