databasecolumns

package
v0.20230731.1154533 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2021-02-01-preview/databasecolumns Documentation

The databasecolumns SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2021-02-01-preview).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2021-02-01-preview/databasecolumns"

Client Initialization

client := databasecolumns.NewDatabaseColumnsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DatabaseColumnsClient.Get

ctx := context.TODO()
id := databasecolumns.NewColumnID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "schemaValue", "tableValue", "columnValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DatabaseColumnsClient.ListByDatabase

ctx := context.TODO()
id := databasecolumns.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")

// alternatively `client.ListByDatabase(ctx, id, databasecolumns.DefaultListByDatabaseOperationOptions())` can be used to do batched pagination
items, err := client.ListByDatabaseComplete(ctx, id, databasecolumns.DefaultListByDatabaseOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: DatabaseColumnsClient.ListByTable

ctx := context.TODO()
id := databasecolumns.NewTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "schemaValue", "tableValue")

// alternatively `client.ListByTable(ctx, id, databasecolumns.DefaultListByTableOperationOptions())` can be used to do batched pagination
items, err := client.ListByTableComplete(ctx, id, databasecolumns.DefaultListByTableOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForColumnDataType

func PossibleValuesForColumnDataType() []string

func PossibleValuesForTableTemporalType

func PossibleValuesForTableTemporalType() []string

func ValidateColumnID

func ValidateColumnID(input interface{}, key string) (warnings []string, errors []error)

ValidateColumnID checks that 'input' can be parsed as a Column ID

func ValidateDatabaseID

func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error)

ValidateDatabaseID checks that 'input' can be parsed as a Database ID

func ValidateTableID

func ValidateTableID(input interface{}, key string) (warnings []string, errors []error)

ValidateTableID checks that 'input' can be parsed as a Table ID

Types

type ColumnDataType

type ColumnDataType string
const (
	ColumnDataTypeBigint           ColumnDataType = "bigint"
	ColumnDataTypeBinary           ColumnDataType = "binary"
	ColumnDataTypeBit              ColumnDataType = "bit"
	ColumnDataTypeChar             ColumnDataType = "char"
	ColumnDataTypeDate             ColumnDataType = "date"
	ColumnDataTypeDatetime         ColumnDataType = "datetime"
	ColumnDataTypeDatetimeTwo      ColumnDataType = "datetime2"
	ColumnDataTypeDatetimeoffset   ColumnDataType = "datetimeoffset"
	ColumnDataTypeDecimal          ColumnDataType = "decimal"
	ColumnDataTypeFloat            ColumnDataType = "float"
	ColumnDataTypeGeography        ColumnDataType = "geography"
	ColumnDataTypeGeometry         ColumnDataType = "geometry"
	ColumnDataTypeHierarchyid      ColumnDataType = "hierarchyid"
	ColumnDataTypeImage            ColumnDataType = "image"
	ColumnDataTypeInt              ColumnDataType = "int"
	ColumnDataTypeMoney            ColumnDataType = "money"
	ColumnDataTypeNchar            ColumnDataType = "nchar"
	ColumnDataTypeNtext            ColumnDataType = "ntext"
	ColumnDataTypeNumeric          ColumnDataType = "numeric"
	ColumnDataTypeNvarchar         ColumnDataType = "nvarchar"
	ColumnDataTypeReal             ColumnDataType = "real"
	ColumnDataTypeSmalldatetime    ColumnDataType = "smalldatetime"
	ColumnDataTypeSmallint         ColumnDataType = "smallint"
	ColumnDataTypeSmallmoney       ColumnDataType = "smallmoney"
	ColumnDataTypeSqlVariant       ColumnDataType = "sql_variant"
	ColumnDataTypeSysname          ColumnDataType = "sysname"
	ColumnDataTypeText             ColumnDataType = "text"
	ColumnDataTypeTime             ColumnDataType = "time"
	ColumnDataTypeTimestamp        ColumnDataType = "timestamp"
	ColumnDataTypeTinyint          ColumnDataType = "tinyint"
	ColumnDataTypeUniqueidentifier ColumnDataType = "uniqueidentifier"
	ColumnDataTypeVarbinary        ColumnDataType = "varbinary"
	ColumnDataTypeVarchar          ColumnDataType = "varchar"
	ColumnDataTypeXml              ColumnDataType = "xml"
)

func (*ColumnDataType) UnmarshalJSON

func (s *ColumnDataType) UnmarshalJSON(bytes []byte) error

type ColumnId

type ColumnId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
	SchemaName        string
	TableName         string
	ColumnName        string
}

ColumnId is a struct representing the Resource ID for a Column

func NewColumnID

func NewColumnID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string) ColumnId

NewColumnID returns a new ColumnId struct

func ParseColumnID

func ParseColumnID(input string) (*ColumnId, error)

ParseColumnID parses 'input' into a ColumnId

func ParseColumnIDInsensitively

func ParseColumnIDInsensitively(input string) (*ColumnId, error)

ParseColumnIDInsensitively parses 'input' case-insensitively into a ColumnId note: this method should only be used for API response data and not user input

func (ColumnId) ID

func (id ColumnId) ID() string

ID returns the formatted Column ID

func (ColumnId) Segments

func (id ColumnId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Column ID

func (ColumnId) String

func (id ColumnId) String() string

String returns a human-readable description of this Column ID

type DatabaseColumn

type DatabaseColumn struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *DatabaseColumnProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type DatabaseColumnOperationPredicate

type DatabaseColumnOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (DatabaseColumnOperationPredicate) Matches

type DatabaseColumnProperties

type DatabaseColumnProperties struct {
	ColumnType      *ColumnDataType    `json:"columnType,omitempty"`
	IsComputed      *bool              `json:"isComputed,omitempty"`
	MemoryOptimized *bool              `json:"memoryOptimized,omitempty"`
	TemporalType    *TableTemporalType `json:"temporalType,omitempty"`
}

type DatabaseColumnsClient

type DatabaseColumnsClient struct {
	Client *resourcemanager.Client
}

func NewDatabaseColumnsClientWithBaseURI

func NewDatabaseColumnsClientWithBaseURI(api environments.Api) (*DatabaseColumnsClient, error)

func (DatabaseColumnsClient) Get

Get ...

func (DatabaseColumnsClient) ListByDatabase

ListByDatabase ...

func (DatabaseColumnsClient) ListByDatabaseComplete

ListByDatabaseComplete retrieves all the results into a single object

func (DatabaseColumnsClient) ListByDatabaseCompleteMatchingPredicate

func (c DatabaseColumnsClient) ListByDatabaseCompleteMatchingPredicate(ctx context.Context, id DatabaseId, options ListByDatabaseOperationOptions, predicate DatabaseColumnOperationPredicate) (result ListByDatabaseCompleteResult, err error)

ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DatabaseColumnsClient) ListByTable

ListByTable ...

func (DatabaseColumnsClient) ListByTableComplete

ListByTableComplete retrieves all the results into a single object

func (DatabaseColumnsClient) ListByTableCompleteMatchingPredicate

func (c DatabaseColumnsClient) ListByTableCompleteMatchingPredicate(ctx context.Context, id TableId, options ListByTableOperationOptions, predicate DatabaseColumnOperationPredicate) (result ListByTableCompleteResult, err error)

ListByTableCompleteMatchingPredicate retrieves all the results and then applies the predicate

type DatabaseId

type DatabaseId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
}

DatabaseId is a struct representing the Resource ID for a Database

func NewDatabaseID

func NewDatabaseID(subscriptionId string, resourceGroupName string, serverName string, databaseName string) DatabaseId

NewDatabaseID returns a new DatabaseId struct

func ParseDatabaseID

func ParseDatabaseID(input string) (*DatabaseId, error)

ParseDatabaseID parses 'input' into a DatabaseId

func ParseDatabaseIDInsensitively

func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error)

ParseDatabaseIDInsensitively parses 'input' case-insensitively into a DatabaseId note: this method should only be used for API response data and not user input

func (DatabaseId) ID

func (id DatabaseId) ID() string

ID returns the formatted Database ID

func (DatabaseId) Segments

func (id DatabaseId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Database ID

func (DatabaseId) String

func (id DatabaseId) String() string

String returns a human-readable description of this Database ID

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DatabaseColumn
}

type ListByDatabaseCompleteResult

type ListByDatabaseCompleteResult struct {
	Items []DatabaseColumn
}

type ListByDatabaseOperationOptions

type ListByDatabaseOperationOptions struct {
	Column  *[]string
	OrderBy *[]string
	Schema  *[]string
	Table   *[]string
}

func DefaultListByDatabaseOperationOptions

func DefaultListByDatabaseOperationOptions() ListByDatabaseOperationOptions

func (ListByDatabaseOperationOptions) ToHeaders

func (ListByDatabaseOperationOptions) ToOData

func (ListByDatabaseOperationOptions) ToQuery

type ListByDatabaseOperationResponse

type ListByDatabaseOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DatabaseColumn
}

type ListByTableCompleteResult

type ListByTableCompleteResult struct {
	Items []DatabaseColumn
}

type ListByTableOperationOptions

type ListByTableOperationOptions struct {
	Filter *string
}

func DefaultListByTableOperationOptions

func DefaultListByTableOperationOptions() ListByTableOperationOptions

func (ListByTableOperationOptions) ToHeaders

func (ListByTableOperationOptions) ToOData

func (ListByTableOperationOptions) ToQuery

type ListByTableOperationResponse

type ListByTableOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DatabaseColumn
}

type TableId

type TableId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
	SchemaName        string
	TableName         string
}

TableId is a struct representing the Resource ID for a Table

func NewTableID

func NewTableID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string) TableId

NewTableID returns a new TableId struct

func ParseTableID

func ParseTableID(input string) (*TableId, error)

ParseTableID parses 'input' into a TableId

func ParseTableIDInsensitively

func ParseTableIDInsensitively(input string) (*TableId, error)

ParseTableIDInsensitively parses 'input' case-insensitively into a TableId note: this method should only be used for API response data and not user input

func (TableId) ID

func (id TableId) ID() string

ID returns the formatted Table ID

func (TableId) Segments

func (id TableId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Table ID

func (TableId) String

func (id TableId) String() string

String returns a human-readable description of this Table ID

type TableTemporalType

type TableTemporalType string
const (
	TableTemporalTypeHistoryTable                 TableTemporalType = "HistoryTable"
	TableTemporalTypeNonTemporalTable             TableTemporalType = "NonTemporalTable"
	TableTemporalTypeSystemVersionedTemporalTable TableTemporalType = "SystemVersionedTemporalTable"
)

func (*TableTemporalType) UnmarshalJSON

func (s *TableTemporalType) UnmarshalJSON(bytes []byte) error

Jump to

Keyboard shortcuts

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