These functions will ensure that UTC time is used for billing queries, eliminating the need for the repository to set the timezone. This also means the repository no longern needs a writer.
20 lines
430 B
Go
20 lines
430 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package billing
|
|
|
|
const (
|
|
activeUsersLastTwoMonthsQuery = `
|
|
select *
|
|
from hcp_billing_monthly_active_users_last_2_months();
|
|
`
|
|
activeUsersWithStartTimeQuery = `
|
|
select *
|
|
from hcp_billing_monthly_active_users_all(@start_time);
|
|
`
|
|
activeUsersWithStartTimeAndEndTimeQuery = `
|
|
select *
|
|
from hcp_billing_monthly_active_users_all(@start_time, @end_time);
|
|
`
|
|
)
|