mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-10 12:57:54 +00:00
Update error message and use it for 'frame not found' as well
This commit is contained in:
parent
1326fe120c
commit
f72a0a1b09
1 changed files with 9 additions and 4 deletions
|
|
@ -96,15 +96,20 @@ class REPL {
|
|||
var output_string = res['output']
|
||||
var output_json = JSON.parse(output_string)
|
||||
var result_class = "result-output"
|
||||
var getting_started_errors = [
|
||||
'database not found', // TODO db->index
|
||||
'frame not found',
|
||||
]
|
||||
|
||||
if("error" in output_json) {
|
||||
result_class = "result-error"
|
||||
if(output_json['error'] == 'database not found') { // TODO db->index
|
||||
output_string = `Error: index not found<br />
|
||||
if(getting_started_errors.indexOf(output_json['error']) >= 0) {
|
||||
output_string += `<br />
|
||||
<br />
|
||||
Just getting started? Try this:<br />
|
||||
$ curl -XPOST "http://127.0.0.1:10101/db/test" -d '{"options": {"columnLabel": "col"}}' # create a database<br />
|
||||
$ curl -XPOST "http://127.0.0.1:10101/db/test/frame/foo" -d '{"options": {"rowLabel": "row"}}' # create a frame<br />
|
||||
$ curl -XPOST "http://127.0.0.1:10101/db/test" -d '{"options": {"columnLabel": "col"}}' # create index "test"<br />
|
||||
$ curl -XPOST "http://127.0.0.1:10101/db/test/frame/foo" -d '{"options": {"rowLabel": "row"}}' # create frame "foo"<br />
|
||||
# Select "test" in the index dropdown above<br />
|
||||
SetBit(row=0, col=0, frame=foo) # Use PQL to set a bit
|
||||
`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue