public final class CreateDB extends ACreate
Constructor and Description |
---|
CreateDB(String name)
Default constructor.
|
CreateDB(String name,
String input)
Constructor, specifying an initial database input.
|
Modifier and Type | Method and Description |
---|---|
void |
build(CmdBuilder cb)
Builds a string representation from the command.
|
static Data |
create(String name,
Parser parser,
Context ctx,
MainOptions options)
Returns a database instance from the specified parser.
|
static Data |
create(String name,
Parser parser,
Context ctx,
MainOptions options,
boolean mem)
Creates a new database instance, using the specified parser.
|
void |
databases(LockResult lr)
Adds the names of the databases that may be touched by the process.
|
protected boolean |
run()
Executes the command and serializes the result (internal call).
|
void |
setParser(Parser prsr)
Attaches a parser.
|
newData, stoppable, supportsProg
close, databases, error, execute, execute, finish, finishUpdate, getOption, getOption, info, info, init, run, run, setInput, setInput, startUpdate, toString, toString, updated, updating
abort, checkStop, det, detail, listen, proc, prog, progress, registered, registered, startTimeout, stop, stopTimeout, tit, title
public CreateDB(String name)
Command.setInput(InputStream)
.name
- name of databasepublic void setParser(Parser prsr)
prsr
- input parserprotected boolean run()
Command
public void databases(LockResult lr)
Proc
public static Data create(String name, Parser parser, Context ctx, MainOptions options) throws IOException
name
- name of the databaseparser
- input parserctx
- database contextoptions
- main optionsIOException
- I/O exceptionpublic static Data create(String name, Parser parser, Context ctx, MainOptions options, boolean mem) throws IOException
name
- name of the databaseparser
- input parserctx
- database contextoptions
- main optionsmem
- create main-memory instanceIOException
- I/O exceptionpublic void build(CmdBuilder cb)
Command
Copyright © 2005–2015 BaseX Team. All rights reserved.