Documentation
¶
Overview ¶
Example (RespDBlist_json) ¶
display.Print(
&respDBList{Info: []*types.DatasetIdentifier{
{
Name: "db_a",
Owner: testOwner,
Namespace: "one",
},
{
Name: "db_b",
Owner: testOwner,
Namespace: "two",
},
}},
nil, "json")
Output: { "result": [ { "name": "db_a", "owner": "6f776e6572", "namespace": "one" }, { "name": "db_b", "owner": "6f776e6572", "namespace": "two" } ], "error": "" }
Example (RespDBlist_text) ¶
display.Print(
&respDBList{Info: []*types.DatasetIdentifier{
{
Name: "db_a",
Owner: testOwner,
Namespace: "one",
},
{
Name: "db_b",
Owner: testOwner,
Namespace: "two",
},
},
owner: testOwner},
nil, "text")
Output: Databases belonging to '6f776e6572': Namespace: one Name: db_a Owner: 6f776e6572 Namespace: two Name: db_b Owner: 6f776e6572
Example (RespDBlist_text_0) ¶
display.Print(
&respDBList{Info: []*types.DatasetIdentifier{}, owner: testOwner},
nil, "text")
Output: No databases found for '6f776e6572'.
Example (RespRelations_json) ¶
display.Print(&respRelations{
Data: &types.QueryResult{
ColumnNames: []string{"a", "b"},
ColumnTypes: []*types.DataType{types.TextType, types.TextType},
Values: [][]any{{"1", "2"}, {"3", "4"}},
},
},
nil, "json")
Output: { "result": { "column_names": [ "a", "b" ], "column_types": [ { "name": "text", "is_array": false, "metadata": [ 0, 0 ] }, { "name": "text", "is_array": false, "metadata": [ 0, 0 ] } ], "values": [ [ "1", "2" ], [ "3", "4" ] ] }, "error": "" }
Example (RespRelations_text) ¶
display.Print(&respRelations{
Data: &types.QueryResult{
ColumnNames: []string{"a", "b"},
ColumnTypes: []*types.DataType{types.TextType, types.TextType},
Values: [][]any{{"1", "2"}, {"3", "4"}},
},
},
nil, "text")
Output: | a | b | +---+---+ | 1 | 2 | | 3 | 4 |
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatByteEncoding ¶ added in v0.10.0
FormatByteEncoding formats bytes to be read on the CLI.
func NewCmdDatabase ¶
Types ¶
type NamedParameter ¶ added in v0.10.0
func GetParamList ¶ added in v0.10.0
Click to show internal directories.
Click to hide internal directories.