feat(sql): Add select query #2

Merged
bbenouarets merged 1 commits from bbenouarets-20251110 into main 2025-11-09 23:07:11 +00:00
2 changed files with 26 additions and 0 deletions

14
build/select.go Normal file
View File

@@ -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
}

View File

@@ -9,6 +9,18 @@ func CreateTable(schema *schema.Table) (*string, error) {
return build.CreateTable(schema) 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) { func Insert(schema *schema.Table, data map[string]any) (*string, error) {
return build.Insert(schema, data) return build.Insert(schema, data)
} }