mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-30 22:33:49 +02:00
Plugins and profiles (#2764)
* feat: more plugins * chore(ci): split out benchmarks Attempt to resolve too many open files in ci * chore(ci): split out benchmarks * fix(ci): Attempt to resolve too many open files in ci * fix: set DefaultX for cli flag and service option * fix: restore http broker * fix: default http broker * feat: full nats profile * chore: still ugly, not ready * fix: better initialization for profiles * fix(tests): comment out flaky listen tests * fix: disable benchmarks on gha * chore: cleanup, comments * chore: add nats config source
This commit is contained in:
38
store/postgres/pgx/queries.go
Normal file
38
store/postgres/pgx/queries.go
Normal file
@ -0,0 +1,38 @@
|
||||
package pgx
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Queries struct {
|
||||
// read
|
||||
ListAsc string
|
||||
ListAscLimit string
|
||||
ListDesc string
|
||||
ListDescLimit string
|
||||
ReadOne string
|
||||
ReadManyAsc string
|
||||
ReadManyAscLimit string
|
||||
ReadManyDesc string
|
||||
ReadManyDescLimit string
|
||||
|
||||
// change
|
||||
Write string
|
||||
Delete string
|
||||
DeleteExpired string
|
||||
}
|
||||
|
||||
func NewQueries(database, table string) Queries {
|
||||
return Queries{
|
||||
ListAsc: fmt.Sprintf(list, database, table) + asc,
|
||||
ListAscLimit: fmt.Sprintf(list, database, table) + asc + limit,
|
||||
ListDesc: fmt.Sprintf(list, database, table) + desc,
|
||||
ListDescLimit: fmt.Sprintf(list, database, table) + desc + limit,
|
||||
ReadOne: fmt.Sprintf(readOne, database, table),
|
||||
ReadManyAsc: fmt.Sprintf(readMany, database, table) + asc,
|
||||
ReadManyAscLimit: fmt.Sprintf(readMany, database, table) + asc + limit,
|
||||
ReadManyDesc: fmt.Sprintf(readMany, database, table) + desc,
|
||||
ReadManyDescLimit: fmt.Sprintf(readMany, database, table) + desc + limit,
|
||||
Write: fmt.Sprintf(write, database, table),
|
||||
Delete: fmt.Sprintf(deleteRecord, database, table),
|
||||
DeleteExpired: fmt.Sprintf(deleteExpired, database, table),
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user