chore: upgrade sqlc to 1.19.1 (#8511)

This commit is contained in:
Muhammad Atif Ali
2023-07-15 09:07:19 +03:00
committed by GitHub
parent 7a62534359
commit ce114a7f9f
19 changed files with 68 additions and 68 deletions

View File

@ -7,7 +7,7 @@ import (
"time"
"github.com/google/uuid"
"github.com/tabbed/pqtype"
"github.com/sqlc-dev/pqtype"
"golang.org/x/xerrors"
"github.com/coder/coder/coderd/database"

View File

@ -11,7 +11,7 @@ import (
"time"
"github.com/google/uuid"
"github.com/tabbed/pqtype"
"github.com/sqlc-dev/pqtype"
"golang.org/x/xerrors"
"cdr.dev/slog"

View File

@ -10,7 +10,7 @@ import (
"strconv"
"github.com/google/uuid"
"github.com/tabbed/pqtype"
"github.com/sqlc-dev/pqtype"
"cdr.dev/slog"
"github.com/coder/coder/coderd/database"

View File

@ -13,8 +13,8 @@ import (
"github.com/google/uuid"
"github.com/moby/moby/pkg/namesgenerator"
"github.com/sqlc-dev/pqtype"
"github.com/stretchr/testify/require"
"github.com/tabbed/pqtype"
"github.com/coder/coder/coderd/database"
"github.com/coder/coder/coderd/database/dbauthz"

View File

@ -1,6 +1,6 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.18.0
// sqlc v1.19.1
package database
@ -13,7 +13,7 @@ import (
"github.com/google/uuid"
"github.com/lib/pq"
"github.com/tabbed/pqtype"
"github.com/sqlc-dev/pqtype"
)
type APIKeyScope string
@ -36,8 +36,8 @@ func (e *APIKeyScope) Scan(src interface{}) error {
}
type NullAPIKeyScope struct {
APIKeyScope APIKeyScope
Valid bool // Valid is true if APIKeyScope is not NULL
APIKeyScope APIKeyScope `json:"api_key_scope"`
Valid bool `json:"valid"` // Valid is true if APIKeyScope is not NULL
}
// Scan implements the Scanner interface.
@ -95,8 +95,8 @@ func (e *AppSharingLevel) Scan(src interface{}) error {
}
type NullAppSharingLevel struct {
AppSharingLevel AppSharingLevel
Valid bool // Valid is true if AppSharingLevel is not NULL
AppSharingLevel AppSharingLevel `json:"app_sharing_level"`
Valid bool `json:"valid"` // Valid is true if AppSharingLevel is not NULL
}
// Scan implements the Scanner interface.
@ -161,8 +161,8 @@ func (e *AuditAction) Scan(src interface{}) error {
}
type NullAuditAction struct {
AuditAction AuditAction
Valid bool // Valid is true if AuditAction is not NULL
AuditAction AuditAction `json:"audit_action"`
Valid bool `json:"valid"` // Valid is true if AuditAction is not NULL
}
// Scan implements the Scanner interface.
@ -235,8 +235,8 @@ func (e *BuildReason) Scan(src interface{}) error {
}
type NullBuildReason struct {
BuildReason BuildReason
Valid bool // Valid is true if BuildReason is not NULL
BuildReason BuildReason `json:"build_reason"`
Valid bool `json:"valid"` // Valid is true if BuildReason is not NULL
}
// Scan implements the Scanner interface.
@ -304,8 +304,8 @@ func (e *LogLevel) Scan(src interface{}) error {
}
type NullLogLevel struct {
LogLevel LogLevel
Valid bool // Valid is true if LogLevel is not NULL
LogLevel LogLevel `json:"log_level"`
Valid bool `json:"valid"` // Valid is true if LogLevel is not NULL
}
// Scan implements the Scanner interface.
@ -368,8 +368,8 @@ func (e *LogSource) Scan(src interface{}) error {
}
type NullLogSource struct {
LogSource LogSource
Valid bool // Valid is true if LogSource is not NULL
LogSource LogSource `json:"log_source"`
Valid bool `json:"valid"` // Valid is true if LogSource is not NULL
}
// Scan implements the Scanner interface.
@ -430,8 +430,8 @@ func (e *LoginType) Scan(src interface{}) error {
}
type NullLoginType struct {
LoginType LoginType
Valid bool // Valid is true if LoginType is not NULL
LoginType LoginType `json:"login_type"`
Valid bool `json:"valid"` // Valid is true if LoginType is not NULL
}
// Scan implements the Scanner interface.
@ -495,8 +495,8 @@ func (e *ParameterDestinationScheme) Scan(src interface{}) error {
}
type NullParameterDestinationScheme struct {
ParameterDestinationScheme ParameterDestinationScheme
Valid bool // Valid is true if ParameterDestinationScheme is not NULL
ParameterDestinationScheme ParameterDestinationScheme `json:"parameter_destination_scheme"`
Valid bool `json:"valid"` // Valid is true if ParameterDestinationScheme is not NULL
}
// Scan implements the Scanner interface.
@ -556,8 +556,8 @@ func (e *ParameterScope) Scan(src interface{}) error {
}
type NullParameterScope struct {
ParameterScope ParameterScope
Valid bool // Valid is true if ParameterScope is not NULL
ParameterScope ParameterScope `json:"parameter_scope"`
Valid bool `json:"valid"` // Valid is true if ParameterScope is not NULL
}
// Scan implements the Scanner interface.
@ -616,8 +616,8 @@ func (e *ParameterSourceScheme) Scan(src interface{}) error {
}
type NullParameterSourceScheme struct {
ParameterSourceScheme ParameterSourceScheme
Valid bool // Valid is true if ParameterSourceScheme is not NULL
ParameterSourceScheme ParameterSourceScheme `json:"parameter_source_scheme"`
Valid bool `json:"valid"` // Valid is true if ParameterSourceScheme is not NULL
}
// Scan implements the Scanner interface.
@ -674,8 +674,8 @@ func (e *ParameterTypeSystem) Scan(src interface{}) error {
}
type NullParameterTypeSystem struct {
ParameterTypeSystem ParameterTypeSystem
Valid bool // Valid is true if ParameterTypeSystem is not NULL
ParameterTypeSystem ParameterTypeSystem `json:"parameter_type_system"`
Valid bool `json:"valid"` // Valid is true if ParameterTypeSystem is not NULL
}
// Scan implements the Scanner interface.
@ -733,8 +733,8 @@ func (e *ProvisionerJobType) Scan(src interface{}) error {
}
type NullProvisionerJobType struct {
ProvisionerJobType ProvisionerJobType
Valid bool // Valid is true if ProvisionerJobType is not NULL
ProvisionerJobType ProvisionerJobType `json:"provisioner_job_type"`
Valid bool `json:"valid"` // Valid is true if ProvisionerJobType is not NULL
}
// Scan implements the Scanner interface.
@ -792,8 +792,8 @@ func (e *ProvisionerStorageMethod) Scan(src interface{}) error {
}
type NullProvisionerStorageMethod struct {
ProvisionerStorageMethod ProvisionerStorageMethod
Valid bool // Valid is true if ProvisionerStorageMethod is not NULL
ProvisionerStorageMethod ProvisionerStorageMethod `json:"provisioner_storage_method"`
Valid bool `json:"valid"` // Valid is true if ProvisionerStorageMethod is not NULL
}
// Scan implements the Scanner interface.
@ -848,8 +848,8 @@ func (e *ProvisionerType) Scan(src interface{}) error {
}
type NullProvisionerType struct {
ProvisionerType ProvisionerType
Valid bool // Valid is true if ProvisionerType is not NULL
ProvisionerType ProvisionerType `json:"provisioner_type"`
Valid bool `json:"valid"` // Valid is true if ProvisionerType is not NULL
}
// Scan implements the Scanner interface.
@ -916,8 +916,8 @@ func (e *ResourceType) Scan(src interface{}) error {
}
type NullResourceType struct {
ResourceType ResourceType
Valid bool // Valid is true if ResourceType is not NULL
ResourceType ResourceType `json:"resource_type"`
Valid bool `json:"valid"` // Valid is true if ResourceType is not NULL
}
// Scan implements the Scanner interface.
@ -994,8 +994,8 @@ func (e *StartupScriptBehavior) Scan(src interface{}) error {
}
type NullStartupScriptBehavior struct {
StartupScriptBehavior StartupScriptBehavior
Valid bool // Valid is true if StartupScriptBehavior is not NULL
StartupScriptBehavior StartupScriptBehavior `json:"startup_script_behavior"`
Valid bool `json:"valid"` // Valid is true if StartupScriptBehavior is not NULL
}
// Scan implements the Scanner interface.
@ -1052,8 +1052,8 @@ func (e *UserStatus) Scan(src interface{}) error {
}
type NullUserStatus struct {
UserStatus UserStatus
Valid bool // Valid is true if UserStatus is not NULL
UserStatus UserStatus `json:"user_status"`
Valid bool `json:"valid"` // Valid is true if UserStatus is not NULL
}
// Scan implements the Scanner interface.
@ -1117,8 +1117,8 @@ func (e *WorkspaceAgentLifecycleState) Scan(src interface{}) error {
}
type NullWorkspaceAgentLifecycleState struct {
WorkspaceAgentLifecycleState WorkspaceAgentLifecycleState
Valid bool // Valid is true if WorkspaceAgentLifecycleState is not NULL
WorkspaceAgentLifecycleState WorkspaceAgentLifecycleState `json:"workspace_agent_lifecycle_state"`
Valid bool `json:"valid"` // Valid is true if WorkspaceAgentLifecycleState is not NULL
}
// Scan implements the Scanner interface.
@ -1190,8 +1190,8 @@ func (e *WorkspaceAgentSubsystem) Scan(src interface{}) error {
}
type NullWorkspaceAgentSubsystem struct {
WorkspaceAgentSubsystem WorkspaceAgentSubsystem
Valid bool // Valid is true if WorkspaceAgentSubsystem is not NULL
WorkspaceAgentSubsystem WorkspaceAgentSubsystem `json:"workspace_agent_subsystem"`
Valid bool `json:"valid"` // Valid is true if WorkspaceAgentSubsystem is not NULL
}
// Scan implements the Scanner interface.
@ -1252,8 +1252,8 @@ func (e *WorkspaceAppHealth) Scan(src interface{}) error {
}
type NullWorkspaceAppHealth struct {
WorkspaceAppHealth WorkspaceAppHealth
Valid bool // Valid is true if WorkspaceAppHealth is not NULL
WorkspaceAppHealth WorkspaceAppHealth `json:"workspace_app_health"`
Valid bool `json:"valid"` // Valid is true if WorkspaceAppHealth is not NULL
}
// Scan implements the Scanner interface.
@ -1315,8 +1315,8 @@ func (e *WorkspaceTransition) Scan(src interface{}) error {
}
type NullWorkspaceTransition struct {
WorkspaceTransition WorkspaceTransition
Valid bool // Valid is true if WorkspaceTransition is not NULL
WorkspaceTransition WorkspaceTransition `json:"workspace_transition"`
Valid bool `json:"valid"` // Valid is true if WorkspaceTransition is not NULL
}
// Scan implements the Scanner interface.

View File

@ -1,6 +1,6 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.18.0
// sqlc v1.19.1
package database

View File

@ -1,6 +1,6 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.18.0
// sqlc v1.19.1
package database
@ -12,7 +12,7 @@ import (
"github.com/google/uuid"
"github.com/lib/pq"
"github.com/tabbed/pqtype"
"github.com/sqlc-dev/pqtype"
)
const deleteAPIKeyByID = `-- name: DeleteAPIKeyByID :exec
@ -490,7 +490,7 @@ type GetAuditLogsOffsetRow struct {
UserEmail sql.NullString `db:"user_email" json:"user_email"`
UserCreatedAt sql.NullTime `db:"user_created_at" json:"user_created_at"`
UserStatus NullUserStatus `db:"user_status" json:"user_status"`
UserRoles []string `db:"user_roles" json:"user_roles"`
UserRoles pq.StringArray `db:"user_roles" json:"user_roles"`
UserAvatarUrl sql.NullString `db:"user_avatar_url" json:"user_avatar_url"`
Count int64 `db:"count" json:"count"`
}
@ -539,7 +539,7 @@ func (q *sqlQuerier) GetAuditLogsOffset(ctx context.Context, arg GetAuditLogsOff
&i.UserEmail,
&i.UserCreatedAt,
&i.UserStatus,
pq.Array(&i.UserRoles),
&i.UserRoles,
&i.UserAvatarUrl,
&i.Count,
); err != nil {
@ -2370,7 +2370,7 @@ WHERE
`
type GetProvisionerJobsByIDsWithQueuePositionRow struct {
ProvisionerJob ProvisionerJob `db:"provisionerjob" json:"provisionerjob"`
ProvisionerJob ProvisionerJob `db:"provisioner_job" json:"provisioner_job"`
QueuePosition int64 `db:"queue_position" json:"queue_position"`
QueueSize int64 `db:"queue_size" json:"queue_size"`
}

View File

@ -14,7 +14,7 @@ import (
"time"
"github.com/google/uuid"
"github.com/tabbed/pqtype"
"github.com/sqlc-dev/pqtype"
"golang.org/x/oauth2"
"golang.org/x/xerrors"

View File

@ -12,8 +12,8 @@ import (
"github.com/go-chi/chi/v5"
"github.com/google/uuid"
"github.com/sqlc-dev/pqtype"
"github.com/stretchr/testify/require"
"github.com/tabbed/pqtype"
"github.com/coder/coder/coderd/database"
"github.com/coder/coder/coderd/database/dbtestutil"

View File

@ -16,7 +16,7 @@ import (
"time"
"github.com/google/uuid"
"github.com/tabbed/pqtype"
"github.com/sqlc-dev/pqtype"
semconv "go.opentelemetry.io/otel/semconv/v1.14.0"
"go.opentelemetry.io/otel/trace"
"golang.org/x/exp/maps"

View File

@ -13,7 +13,7 @@ import (
"github.com/go-chi/chi/v5"
"github.com/google/uuid"
"github.com/moby/moby/pkg/namesgenerator"
"github.com/tabbed/pqtype"
"github.com/sqlc-dev/pqtype"
"golang.org/x/xerrors"
"cdr.dev/slog"

View File

@ -11,7 +11,7 @@ import (
"github.com/google/uuid"
"github.com/lib/pq"
"github.com/tabbed/pqtype"
"github.com/sqlc-dev/pqtype"
"golang.org/x/xerrors"
"github.com/coder/coder/coderd/database"