MCPcopy Create free account
hub / github.com/BaseXdb/basex / get

Method get

basex-api/src/main/java/org/basex/http/rest/RESTDelete.java:26–37  ·  view source on GitHub ↗

Creates and returns a REST command. @param session REST session @return command @throws QueryException query exception @throws IOException I/O exception

(final RESTSession session)

Source from the content-addressed store, hash-verified

24 * @throws IOException I/O exception
25 */
26 static RESTExec get(final RESTSession session) throws QueryException, IOException {
27 RESTCmd.assignOptions(session);
28
29 final HTTPConnection conn = session.conn;
30 final String db = conn.db();
31 if(db.isEmpty()) throw HTTPStatus.NO_DATABASE_SPECIFIED.get();
32
33 // open database to ensure it exists
34 final String path = conn.dbpath();
35 session.add(path.isEmpty() ? new DropDB(db) : new Delete(path));
36 return new RESTExec(session, false);
37 }
38}

Callers 1

commandMethod · 0.95

Calls 6

assignOptionsMethod · 0.95
dbMethod · 0.95
dbpathMethod · 0.95
getMethod · 0.65
addMethod · 0.65
isEmptyMethod · 0.45

Tested by

no test coverage detected