(ctx context.Context)
| 38 | } |
| 39 | |
| 40 | func DBGetCount[T waveobj.WaveObj](ctx context.Context) (int, error) { |
| 41 | return WithTxRtn(ctx, func(tx *TxWrap) (int, error) { |
| 42 | table := tableNameGen[T]() |
| 43 | query := fmt.Sprintf("SELECT count(*) FROM %s", table) |
| 44 | return tx.GetInt(query), nil |
| 45 | }) |
| 46 | } |
| 47 | |
| 48 | // returns (num named workespaces, num total workspaces, error) |
| 49 | func DBGetWSCounts(ctx context.Context) (int, int, error) { |