mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-27 00:33:10 -06:00
- Update YAML file to use file: everywhere except for Accounts - Use the CosmosDB conn string in the YAML - Add cosmosdbapi package to wrap the external package - Add Tenant.go to store the tenancy settings - to be removed when tenancy is implemented - Update the 5 tables to use the internal CosmosDBAPI package instead of SQL - Remove sql from storage.go and other files
20 lines
426 B
Go
20 lines
426 B
Go
package cosmosdbapi
|
|
|
|
import (
|
|
cosmosapi "github.com/vippsas/go-cosmosdb/cosmosapi"
|
|
)
|
|
|
|
func GetQuery(qry string, params map[string]interface{}) cosmosapi.Query {
|
|
qryParams := []cosmosapi.QueryParam{}
|
|
for key, value := range params {
|
|
qryParam := cosmosapi.QueryParam {
|
|
Name: key,
|
|
Value: value,
|
|
}
|
|
qryParams = append(qryParams, qryParam)
|
|
}
|
|
return cosmosapi.Query {
|
|
Query: qry,
|
|
Params: qryParams,
|
|
}
|
|
} |