mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
Commit from m3o/m3o action
This commit is contained in:
18
db/db.go
18
db/db.go
@@ -40,6 +40,14 @@ func (t *DbService) Delete(request *DeleteRequest) (*DeleteResponse, error) {
|
||||
|
||||
}
|
||||
|
||||
// Drop a table in the DB
|
||||
func (t *DbService) DropTable(request *DropTableRequest) (*DropTableResponse, error) {
|
||||
|
||||
rsp := &DropTableResponse{}
|
||||
return rsp, t.client.Call("db", "DropTable", request, rsp)
|
||||
|
||||
}
|
||||
|
||||
// List tables in the DB
|
||||
func (t *DbService) ListTables(request *ListTablesRequest) (*ListTablesResponse, error) {
|
||||
|
||||
@@ -112,6 +120,13 @@ type DeleteRequest struct {
|
||||
type DeleteResponse struct {
|
||||
}
|
||||
|
||||
type DropTableRequest struct {
|
||||
Table string `json:"table"`
|
||||
}
|
||||
|
||||
type DropTableResponse struct {
|
||||
}
|
||||
|
||||
type ListTablesRequest struct {
|
||||
}
|
||||
|
||||
@@ -157,13 +172,10 @@ type RenameTableResponse struct {
|
||||
}
|
||||
|
||||
type TruncateRequest struct {
|
||||
// Optional table name. Defaults to 'default'
|
||||
Table string `json:"table"`
|
||||
}
|
||||
|
||||
type TruncateResponse struct {
|
||||
// The table truncated
|
||||
Table string `json:"table"`
|
||||
}
|
||||
|
||||
type UpdateRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user