-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add event tables to sdk #2215
Conversation
|
||
// CreateEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/create-event-table. | ||
type CreateEventTableOptions struct { | ||
create bool `ddl:"static" sql:"CREATE"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type CreateEventTableOptions struct { | ||
create bool `ddl:"static" sql:"CREATE"` | ||
OrReplace *bool `ddl:"keyword" sql:"OR REPLACE"` | ||
eventTable bool `ddl:"static" sql:"EVENT TABLE"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/sdk/event_tables_gen.go
Outdated
|
||
// ShowEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/show-event-tables. | ||
type ShowEventTableOptions struct { | ||
show bool `ddl:"static" sql:"SHOW"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/sdk/event_tables_gen.go
Outdated
// ShowEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/show-event-tables. | ||
type ShowEventTableOptions struct { | ||
show bool `ddl:"static" sql:"SHOW"` | ||
eventTables bool `ddl:"static" sql:"EVENT TABLES"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// DescribeEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/describe-event-table. | ||
type DescribeEventTableOptions struct { | ||
describe bool `ddl:"static" sql:"DESCRIBE"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/sdk/event_tables_gen.go
Outdated
|
||
// AlterEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/alter-event-table. | ||
type AlterEventTableOptions struct { | ||
alter bool `ddl:"static" sql:"ALTER"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/sdk/event_tables_gen.go
Outdated
// AlterEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/alter-event-table. | ||
type AlterEventTableOptions struct { | ||
alter bool `ddl:"static" sql:"ALTER"` | ||
eventTable bool `ddl:"static" sql:"TABLE"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/sdk/event_tables_gen.go
Outdated
} | ||
|
||
type EventTableDropRowAccessPolicy struct { | ||
rowAccessPolicy bool `ddl:"static" sql:"ROW ACCESS POLICY"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
type SearchOptimization struct { | ||
searchOptimization bool `ddl:"static" sql:"SEARCH OPTIMIZATION"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return opts | ||
} | ||
|
||
func (r eventTableRow) convert() *EventTable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integration tests failure for 3ac856ad207507859ab81dab506ed8161769fbda |
|
||
// ShowEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/show-event-tables. | ||
type ShowEventTableOptions struct { | ||
show bool `ddl:"static" sql:"SHOW"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ShowEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/show-event-tables. | ||
type ShowEventTableOptions struct { | ||
show bool `ddl:"static" sql:"SHOW"` | ||
eventTables bool `ddl:"static" sql:"EVENT TABLES"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// DropEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/drop-event-table. | ||
type DropEventTableOptions struct { | ||
drop bool `ddl:"static" sql:"DROP"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// DropEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/drop-event-table. | ||
type DropEventTableOptions struct { | ||
drop bool `ddl:"static" sql:"DROP"` | ||
table bool `ddl:"static" sql:"TABLE"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// AlterEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/alter-event-table. | ||
type AlterEventTableOptions struct { | ||
alter bool `ddl:"static" sql:"ALTER"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// AlterEventTableOptions is based on https://docs.snowflake.com/en/sql-reference/sql/alter-event-table. | ||
type AlterEventTableOptions struct { | ||
alter bool `ddl:"static" sql:"ALTER"` | ||
table bool `ddl:"static" sql:"TABLE"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
type EventTableAddRowAccessPolicy struct { | ||
add bool `ddl:"static" sql:"ADD"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
type EventTableDropRowAccessPolicy struct { | ||
drop bool `ddl:"static" sql:"DROP"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return t | ||
} | ||
|
||
func (r *DescribeEventTableRequest) toOpts() *DescribeEventTableOptions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integration tests failure for f68a196cb7bddc86da86fe03007844d4fb8bd63e |
Integration tests failure for 6d26e1e6379bc60ca99ec6cb3e5572ce85c1f1ce |
pkg/sdk/event_tables_def.go
Outdated
Name(). | ||
WithValidation(g.ValidIdentifier, "name"), | ||
).DropOperation( | ||
"https://docs.snowflake.com/en/sql-reference/sql/drop-event-table", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should point to the drop table page (there's no such page as drop event table)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Integration tests failure for 38fffb91a9dcee635def5460e7ec0246dcbeffaf |
Integration tests failure for 9f2e0bd082b9b972068cc506cc5d36cd1165a208 |
Integration tests failure for c884a41259b4d218f832a780d30f73d5f7706065 |
Integration tests failure for 5d68d59bb599b3e38d52ecb4fa8624c41398dfca |
Integration tests failure for b43974480aa4bad94d350d1ec09dc5aa35ea7ec2 |
https://docs.snowflake.com/en/sql-reference/sql/create-event-table