Changes

Jump to navigation Jump to search
74 bytes added ,  02:24, 16 December 2010
no edit summary
text field in the GUI, or send to the BaseX server:
Try "help [...]" to get info on a specific command. ===ADD===
'''<code>ADD (AS [name]) (TO [target]) [input]</code>'''
'''<code>[target]</code>''' path.
===ALTER===
'''<code>ALTER [USER|DATABASE] [...]</code>'''
Alters user password or database name:
 
* '''<code>USER [name] ([password])</code>''':
: alters the password of a user.
 
* '''<code>DATABASE [name] [newname]</code>'''
: alters the name of a database.
===BACKUP===
'''<code>BACKUP [name]</code>'''
Creates a backup of the specified database.
===CLOSE===
'''<code>CLOSE </code>'''
Closes the currently opened database.
===CREATE===
'''<code>CREATE [DATABASE|FS|INDEX|USER] [...]</code>'''
Creates a new database, index or user:
 
* '''<code>DATABASE [name] ([input])</code>''':
: creates the database '''<code>[name]</code>''' with an optional '''<code>[input]</code>'''
 
* '''<code>INDEX [TEXT|ATTRIBUTE|FULLTEXT|PATH]</code>''':
: creates the specified index
 
* '''<code>FS [name] [path] ([mountpoint] [backingstore])</code>''':
: creates filesystem database '''<code>[name]</code>''' for '''<code>[path]</code>'''
: (using '''<code>[mountpoint]</code>''' and '''<code>[backingstore]</code>''' if FUSE is activated)
 
* '''<code>USER [name] ([password])</code>''':
: creates the specified user
===CS===
'''<code>CS [query]</code>'''
Evaluates the query and sets the result as new context set.
===DELETE===
'''<code>DELETE [name]</code>'''
Deletes documents from the currently opened database.
===DROP===
'''<code>DROP [DATABASE|INDEX|USER] [...]</code>'''
Drops a database, index or user:
 
* '''<code>DATABASE [name]</code>''':
: drops the database
 
* '''<code>INDEX [PATH|TEXT|ATTRIBUTE|FULLTEXT]</code>''':
: drops the specified index
 
* '''<code>USER [name]</code>''':
: drops the specified user
 
* '''<code>BACKUP [name]</code>''':
: drops the database backup
===EXIT===
'''<code>EXIT </code>'''
Exits BaseX.
===EXPORT===
'''<code>EXPORT [path]</code>'''
Exports the database to '''<code>[path]</code>'''.
===FIND===
'''<code>FIND [query]</code>'''
:@ : looks for attributes
===GRANT===
'''<code>GRANT [NONE|READ|WRITE|CREATE|ADMIN] (ON [db]) TO [user]</code>'''
Grants permissions (on a database) to a user.
===HELP===
'''<code>HELP ([command])</code>'''
command is printed; otherwise, all commands are listed.
===INFO===
'''<code>INFO ([DATABASE|INDEX|STORAGE])</code>'''
Shows information on the currently opened database:
 
* '''<code>no argument</code>''': show global information
 
* '''<code>DATABASE</code>''': shows database information
 
* '''<code>INDEX</code>''': shows index information
 
* '''<code>STORAGE [start end] | [query]</code>''': show internal database table
===KILL===
'''<code>KILL [name]</code>'''
Kills all sessions of the specified user.
===LIST===
'''<code>LIST </code>'''
Lists all available databases.
===OPEN===
'''<code>OPEN [name]</code>'''
Opens the specified database '''<code>[name]</code>'''.
===OPTIMIZE===
'''<code>OPTIMIZE </code>'''
Optimizes the current database structures.
===PASSWORD===
'''<code>PASSWORD ([password])</code>'''
Changes the user's password.
===RESTORE===
'''<code>RESTORE [name]</code>'''
Restores a backup of the specified database.
===RUN===
'''<code>RUN [path]</code>'''
Evaluates an query from '''<code>[path]</code>''' and prints the result.
===SET===
'''<code>SET [option] ([value])</code>'''
Available options '''<code>[option]</code>''' with value '''<code>[value]</code>''' = on/off:
 
* '''<code>QUERYINFO</code>''': Display of query info
 
* '''<code>DEBUG</code>''': Display of debug info
 
* '''<code>SERIALIZE</code>''': Serialization of query results
 
* '''<code>CHOP</code>''': Chopping of XML whitespaces
 
* '''<code>ENTITY</code>''': Parsing of XML entities
 
* '''<code>TEXTINDEX</code>''': Text indexing
 
* '''<code>ATTRINDEX</code>''': Attribute value indexing
 
* '''<code>FTINDEX</code>''': Full-text indexing
 
* '''<code>PATHINDEX</code>''': Path indexing
Have a look into [[Settings]] to find a complete list of available options.
===SHOW===
'''<code>SHOW [DATABASES|SESSIONS|USERS|BACKUPS]</code>'''
Shows server information:
 
* '''<code>DATABASES</code>''': shows currently opened databases.
 
* '''<code>SESSIONS</code>''': shows current database sessions.
 
* '''<code>USERS (ON [db])</code>''': shows users (on a database).
 
* '''<code>BACKUPS</code>''': shows backups.
===XQUERY===
'''<code>XQUERY [query]</code>'''
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu