Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
hupe1980 committed Jul 29, 2023
1 parent 5434ed2 commit 34cad6d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chain/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ func (c *SQL) OutputKeys() []string {
return []string{c.opts.OutputKey}
}

// checkTables checks if the provided tables are allowed based on the options specified in SQLOptions.
// If the Tables option is set, it verifies that the tables are present in the allowed list.
// If the Exclude option is set, it verifies that the tables are not present in the excluded list.
// If a table is not allowed, it returns an error indicating that the table is not allowed for use in the SQL query.
func (c *SQL) checkTables(tables []string) error {
if len(c.opts.Tables) > 0 {
for _, t := range tables {
Expand Down

0 comments on commit 34cad6d

Please sign in to comment.