39 lines
992 B
Go
39 lines
992 B
Go
package pgson
|
|
|
|
import (
|
|
"git.secnex.io/secnex/pgson/build"
|
|
"git.secnex.io/secnex/pgson/schema"
|
|
)
|
|
|
|
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)
|
|
}
|
|
|
|
func Update(schema *schema.Table, data map[string]any, where map[string]any) (*string, error) {
|
|
return build.Update(schema, data, where)
|
|
}
|
|
|
|
func Delete(schema *schema.Table, where map[string]any) (*string, error) {
|
|
return build.UpdateDeletedAt(schema, where)
|
|
}
|
|
|
|
func HardDelete(schema *schema.Table, where map[string]any) (*string, error) {
|
|
return build.Delete(schema, where)
|
|
}
|