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

Method name

basex-core/src/main/java/org/basex/core/Databases.java:151–154  ·  view source on GitHub ↗

Extracts the name of a database from the name of a backup. @param backup name of the backup (empty string for general data), optionally followed by date @return name of the database (empty string for general data)

(final String backup)

Source from the content-addressed store, hash-verified

149 * @return name of the database (empty string for general data)
150 */
151 public static String name(final String backup) {
152 final String[] strings = Pattern.compile('-' + DATE + '$').split(backup);
153 return strings.length > 0 ? strings[0] : "";
154 }
155
156 /**
157 * Extracts the date of a database from the name of a backup.

Callers 5

runMethod · 0.95
addLocksMethod · 0.95
dataLockMethod · 0.95
itemMethod · 0.95
getMethod · 0.95

Calls 2

compileMethod · 0.65
splitMethod · 0.45

Tested by

no test coverage detected