Skip to content

Commit

Permalink
update procedures
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-swinkler committed Dec 4, 2023
1 parent d63b18c commit a0f9ccd
Show file tree
Hide file tree
Showing 10 changed files with 1,059 additions and 1,336 deletions.
28 changes: 28 additions & 0 deletions pkg/sdk/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,31 @@ func (row *propertyRow) toBoolProperty() *BoolProperty {
Description: row.Description,
}
}

type ExecuteAs string

func ExecuteAsPointer(v ExecuteAs) *ExecuteAs {
return &v
}

const (
ExecuteAsCaller ExecuteAs = "EXECUTE AS CALLER"
ExecuteAsOwner ExecuteAs = "EXECUTE AS OWNER"
)

type NullInputBehavior string

func NullInputBehaviorPointer(v NullInputBehavior) *NullInputBehavior {
return &v
}

const (
NullInputBehaviorCalledOnNullInput NullInputBehavior = "CALLED ON NULL INPUT"
NullInputBehaviorReturnNullInput NullInputBehavior = "RETURN NULL ON NULL INPUT"
NullInputBehaviorStrict NullInputBehavior = "STRICT"
)

type Secret struct {
VariableName string `ddl:"keyword,single_quotes"`
Name string `ddl:"parameter,no_quotes"`
}
4 changes: 2 additions & 2 deletions pkg/sdk/poc/generator/keyword_builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (v *QueryStruct) SetTags() *QueryStruct {
}

func (v *QueryStruct) OptionalSetTags() *QueryStruct {
return v.setTags(nil)
return v.setTags(KeywordOptions().SQL("SET TAG"))
}

func (v *QueryStruct) setTags(transformer *KeywordTransformer) *QueryStruct {
Expand All @@ -91,7 +91,7 @@ func (v *QueryStruct) UnsetTags() *QueryStruct {
}

func (v *QueryStruct) OptionalUnsetTags() *QueryStruct {
return v.unsetTags(nil)
return v.unsetTags(KeywordOptions().SQL("UNSET TAG"))
}

func (v *QueryStruct) unsetTags(transformer *KeywordTransformer) *QueryStruct {
Expand Down
Loading

0 comments on commit a0f9ccd

Please sign in to comment.