mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
feat: updated database model
This commit is contained in:
@@ -19,9 +19,9 @@ type DatabaseColumn struct {
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Primary bool `json:"primary,omitempty"`
|
Primary bool `json:"primary,omitempty"`
|
||||||
NotNull bool `json:"not_null"`
|
NotNull bool `json:"not_null,omitempty"`
|
||||||
Key string `json:"key,omitempty"`
|
Key string `json:"key,omitempty"`
|
||||||
Default string `json:"default"`
|
Default string `json:"default,omitempty"`
|
||||||
Extra string `json:"extra,omitempty"`
|
Extra string `json:"extra,omitempty"`
|
||||||
AutoIncrement bool `json:"auto_increment,omitempty"`
|
AutoIncrement bool `json:"auto_increment,omitempty"`
|
||||||
Children []DatabaseColumn `json:"children,omitempty"`
|
Children []DatabaseColumn `json:"children,omitempty"`
|
||||||
@@ -52,3 +52,10 @@ func (col *DatabaseIndexColumn) OrderString() string {
|
|||||||
return "ASC"
|
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"`
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user