Go to the first, previous, next, last section, table of contents.


rootRemoveDb

Function: rootRemoveDb { [db] -> [] }
file: job.t
package: muf
status: alpha

This function removes the given db from the server state, which essentially means removing all the information nassociated with that db from the currently open .muq file:

root:
[ .db["mydb"] | rootRemoveDb ]pop
root:

All references from other dbs to objects in the deleted db will be replaced by nils: If there are such references in critical spots, these new nils may (say) cripple an index object or even crash the server.

The implementation attempts to catch and prevent common cases of this, and will likely be upgraded to catch additional cases in the future, but caution and good sense are advised.

If you are primarily trying to upgrade a db, it is usually a bad idea to do rootRemoveDb followed immediately by rootImportDb because this sequence is guaranteed to break (replace by nil) all pointers from outside the db into it: It is better to do rootReplaceDb, which will leave these pointers intact if reasonably possible.

See section rootReplaceDb.


Go to the first, previous, next, last section, table of contents.