feat: add back the InfluxQL REPL (#386)

* add v1-compatible query path and refactor other paths to de-duplicate "/query"

* add initial influxQL repl

* add ping endpoint to schema

* improve prompt UX, implement some commands

* fix json column type in schema and improve completion

* feat: add table formatter and move to forked go-prompt

* improve formatting and add table pagination

* implement more REPL commands, including insert and history

* implement "INSERT INTO"

* move repl command to "v1 repl"

* refactor and improve documentation

* clean up v1_repl cmd

* update to latest openapi, use some openapi paths instead of overrides

* remove additional files that were moved to openapi

* compute historyFilePath at REPL start

* clean up REPL use command logic flow

* clean up comments for TODOs now in issues

* move gopher (chonky boi)

* remove autocompletion for separate PR

* run go mod tidy

* add rfc3339 precision option

* allow left and right column scrolling to display whole table

* add error to JSON query response

* add tags and partial to JSON response series schema

* fix csv formatting and add column formatting

* remove table format for separate PR

* fix getDatabases

* move from write to legacy write endpoint for INSERT

* remove history vestiges

* allow multiple spaces in INSERT commands

* add precision comment

* remove auth for separate PR

* separate parseInsert and add unit test

* add additional test case and improve error messages

* fix missing errors import

* print rfc3339 precision

* add rfc3339 to help output
This commit is contained in:
Andrew Lee
2022-06-10 08:54:07 -06:00
committed by GitHub
parent 51ca97ee29
commit fc529745a5
44 changed files with 2959 additions and 305 deletions

View File

@ -226,7 +226,7 @@ func (a *RestoreApiService) PostRestoreBucketIDExecuteWithHttpInfo(r ApiPostRest
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/restore/buckets/{bucketID}"
localVarPath := localBasePath + "/api/v2/restore/buckets/{bucketID}"
localVarPath = strings.Replace(localVarPath, "{"+"bucketID"+"}", _neturl.PathEscape(parameterToString(r.bucketID, "")), -1)
localVarHeaderParams := make(map[string]string)
@ -396,7 +396,7 @@ func (a *RestoreApiService) PostRestoreBucketMetadataExecuteWithHttpInfo(r ApiPo
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/restore/bucketMetadata"
localVarPath := localBasePath + "/api/v2/restore/bucketMetadata"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
@ -580,7 +580,7 @@ func (a *RestoreApiService) PostRestoreKVExecuteWithHttpInfo(r ApiPostRestoreKVR
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/restore/kv"
localVarPath := localBasePath + "/api/v2/restore/kv"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
@ -767,7 +767,7 @@ func (a *RestoreApiService) PostRestoreSQLExecuteWithHttpInfo(r ApiPostRestoreSQ
return nil, GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/restore/sql"
localVarPath := localBasePath + "/api/v2/restore/sql"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
@ -946,7 +946,7 @@ func (a *RestoreApiService) PostRestoreShardIdExecuteWithHttpInfo(r ApiPostResto
return nil, GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/restore/shards/{shardID}"
localVarPath := localBasePath + "/api/v2/restore/shards/{shardID}"
localVarPath = strings.Replace(localVarPath, "{"+"shardID"+"}", _neturl.PathEscape(parameterToString(r.shardID, "")), -1)
localVarHeaderParams := make(map[string]string)