Skip to content

Commit

Permalink
feat: updated database model
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Sep 29, 2024
1 parent 204021d commit 64d664b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/entity/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ type DatabaseColumn struct {
Name string `json:"name"`
Type string `json:"type"`
Primary bool `json:"primary,omitempty"`
NotNull bool `json:"not_null"`
NotNull bool `json:"not_null,omitempty"`
Key string `json:"key,omitempty"`
Default string `json:"default"`
Default string `json:"default,omitempty"`
Extra string `json:"extra,omitempty"`
AutoIncrement bool `json:"auto_increment,omitempty"`
Children []DatabaseColumn `json:"children,omitempty"`
Expand Down Expand Up @@ -52,3 +52,10 @@ func (col *DatabaseIndexColumn) OrderString() string {
return "ASC"
}
}

type DatabaseQueryResults struct {
Columns []DatabaseColumn `json:"columns,omitempty"`
Rows []map[string]interface{} `json:"rows,omitempty"`
Output string `json:"output,omitempty"`
Error string `json:"error,omitempty"`
}

0 comments on commit 64d664b

Please sign in to comment.