diff --git a/build/select.go b/build/select.go new file mode 100644 index 0000000..40cdc11 --- /dev/null +++ b/build/select.go @@ -0,0 +1,14 @@ +package build + +import ( + "git.secnex.io/secnex/pgson/schema" + "git.secnex.io/secnex/pgson/sql" +) + +func Select(s *schema.Table, where map[string]any) (*string, error) { + if err := sql.ValidateIdent(s.Name); err != nil { + return nil, err + } + + return nil, nil +} diff --git a/query.go b/query.go index f0bc7f8..5a8348d 100644 --- a/query.go +++ b/query.go @@ -9,6 +9,18 @@ func CreateTable(schema *schema.Table) (*string, error) { return build.CreateTable(schema) } +func DropTable(schema *schema.Table) (*string, error) { + return build.DropTable(schema) +} + +func TruncateTable(schema *schema.Table) (*string, error) { + return build.TruncateTable(schema) +} + +func Select(schema *schema.Table, where map[string]any) (*string, error) { + return build.Select(schema, where) +} + func Insert(schema *schema.Table, data map[string]any) (*string, error) { return build.Insert(schema, data) }