mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 09:13:09 -06:00
* - Implement Cosmos for the devices_table - Use the ConnectionString in the YAML to include the Tenant - Revert all other non implemented tables back to use SQLLite3 * - Change the Config to use "test.criticicalarc.com" Container - Add generic function GetDocumentOrNil to standardize GetDocument - Add func to return CrossPartition queries for Aggregates - Add func GetNextSequence() as generic seq generator for AutoIncrement - Add cosmosdbutil.ErrNoRows to return (emulate) sql.ErrNoRows - Add a "fake" ExclusiveWriterFake - Add standard "getXX", "setXX" and "queryXX" to all TABLE class files - Add specific Table SEQ for the Events table - Add specific Table SEQ for the Rooms table - Add specific Table SEQ for the StateSnapshot table * - Use CosmosDB for the KeyServer - Replace the ConnString in the YAML to Cosmos - Update the 4 tables to use Cosmos
17 lines
347 B
Go
17 lines
347 B
Go
package cosmosdbutil
|
|
|
|
import (
|
|
"database/sql"
|
|
)
|
|
|
|
// The Writer interface is designed to solve the problem of how
|
|
// to handle database writes for database engines that don't allow
|
|
// concurrent writes, e.g. SQLite.
|
|
//
|
|
|
|
// Copied for CosmosDB compatibility
|
|
|
|
type Writer interface {
|
|
Do(db *sql.DB, txn *sql.Tx ,f func(txn *sql.Tx) error) error
|
|
}
|