common

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const RegularIdentifiersDoc = "" /* 159-byte string literal not displayed */

Variables

View Source
var DatabaseIdAttribute = tfsdk.Attribute{
	MarkdownDescription: fmt.Sprintf("ID of database. Can be retrieved using `mssql_database` or `SELECT DB_ID('<db_name>')`."),
	Type:                types.StringType,
}
View Source
var DatabaseIdResourceAttribute = DatabaseIdAttribute

Functions

func GetResourceDb

func GetResourceDb(ctx context.Context, conn sql.Connection, dbId string) sql.Database

func IsAttrSet

func IsAttrSet[T attr.Value](attr T) bool

func ToRequired

func ToRequired(attr tfsdk.Attribute) tfsdk.Attribute

func ToRequiredImmutable

func ToRequiredImmutable(attr tfsdk.Attribute) tfsdk.Attribute

func ToResourceId

func ToResourceId(attr tfsdk.Attribute) tfsdk.Attribute

Types

type DbObjectId

type DbObjectId[T sql.NumericObjectId] struct {
	DbId     sql.DatabaseId
	ObjectId T
	IsEmpty  bool
}

func ParseDbObjectId

func ParseDbObjectId[T sql.NumericObjectId](ctx context.Context, s string) DbObjectId[T]

func (DbObjectId[T]) String

func (id DbObjectId[T]) String() string

type DbObjectMemberId

type DbObjectMemberId[TObject sql.NumericObjectId, TMember sql.NumericObjectId] struct {
	DbObjectId[TObject]
	MemberId TMember
}

func ParseDbObjectMemberId

func ParseDbObjectMemberId[TObject sql.NumericObjectId, TMember sql.NumericObjectId](ctx context.Context, s string) DbObjectMemberId[TObject, TMember]

func (DbObjectMemberId[TObject, TMember]) GetMemberId

func (id DbObjectMemberId[TObject, TMember]) GetMemberId() DbObjectId[TMember]

func (DbObjectMemberId[TObject, TMember]) String

func (id DbObjectMemberId[TObject, TMember]) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL