From ae64f75c307ebedc58575eb30ab487debfdb0661 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Fri, 4 Aug 2017 16:30:49 +0100 Subject: [PATCH] Comment --- .../matrix-org/dendrite/common/partition_offset_table.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/github.com/matrix-org/dendrite/common/partition_offset_table.go b/src/github.com/matrix-org/dendrite/common/partition_offset_table.go index caa60c567..3898cc1f7 100644 --- a/src/github.com/matrix-org/dendrite/common/partition_offset_table.go +++ b/src/github.com/matrix-org/dendrite/common/partition_offset_table.go @@ -45,6 +45,8 @@ type PartitionOffsetStatements struct { } // Prepare converts the raw SQL statements into prepared statements. +// Takes a prefix to prepend to the table name used to store the partition offsets. +// This allows multiple components to share the same database schema. func (s *PartitionOffsetStatements) Prepare(db *sql.DB, prefix string) (err error) { _, err = db.Exec(strings.Replace(partitionOffsetsSchema, "${prefix}", prefix, -1)) if err != nil {