|
Jala 1.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--jala.db.RamDatabase | +--jala.db.FileDatabase
Instances of this class represent a file based in-process database
Important: You need the h2.jar in directory "lib/ext"
of your helma installation for this library to work, which you can get
at http://www.h2database.com/.
Defined in Database.js
Constructor Summary | |
jala.db.FileDatabase
(<String> name, <helma.File> directory, <String> username, <String> password)
Returns a newly created instance of FileDatabase. |
Method Summary | |
Boolean
|
backup(<helma.File> file)
Creates a backup of this database, using the file passed as argument. |
helma.File
|
getDirectory()
Returns the directory where the database files are stored. |
String
|
getName()
Returns the name of the database. |
String
|
getPassword()
Returns the password of this database |
String
|
getUsername()
Returns the username of this database |
Boolean
|
remove()
Deletes all files of this database on disk. |
Boolean
|
restore(<helma.File> backupFile)
Restores this database using a backup on disk. |
Methods inherited from class jala.db.RamDatabase |
getUrl, getProperties, getConnection, shutdown, dropTable, tableExists, copyTables, runScript, dump
|
Constructor Detail |
jala.db.FileDatabase(<String> name, <helma.File> directory, <String> username, <String> password)
name
- The name of the database. This name is used as prefix for all database files
directory
- The directory where the database files should be stored in.
username
- Optional username (defaults to "sa"). This username is used when creating the database, so the same should be used when creating subsequent instances of jala.db.FileDatabase pointing to the same database
password
- Optional password (defaults to "").
Method Detail |
Boolean backup(<helma.File> file)
file
- The file to write the backup to
helma.File getDirectory()
String getName()
String getPassword()
String getUsername()
Boolean remove()
Boolean restore(<helma.File> backupFile)
backupFile
- The backup file to use for restore
|
Jala 1.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |