Namespace: Longo

Longo

Source:

Classes

Collection
Cursor
DB
Error

Namespaces

Status
Utils

Members

<static> LOGLEVEL :String

You can change this value with debug,info,warn,error.

Type:
  • String
Default Value:
  • "warn"
Source:
See:

<static> LONGOROOT :String

The root path for Longo components This value is automatically updated on window onload event.
If you want to access DB object before window onload,
be sure that set correct path with setRoot.

Type:
  • String
Default Value:
  • "/Longo.js"
Source:
See:

<static, constant> VERSION :String

VERSION of module

Type:
  • String
Source:

<static> WORKERJS :String

If you are using longo.min.js,
this value will be automatically replaced with longoWorker.min.js

Type:
  • String
Default Value:
  • "longoWorker.js"
Source:
See:

Methods

<static> createDB(name) → {DB}

Return new database instance.
If sepcifyed name database is already exists, return that database.

Parameters:
Name Type Argument Default Description
name String <optional>
'temp'

database name

Source:
Returns:

db

Type
DB

<static> getRoot()

Return rootPath for longo modules

Source:

<static> getVersion()

Return version of Longo module

Source:

<static> setLogLevel(loglevel)

Set logging level.

Parameters:
Name Type Description
loglevel string

log,debug,info,warn,error

Source:

<static> setRoot(root)

Set rootPath for longo modules
This method will be called when window load event fired.

Parameters:
Name Type Description
root String

Abstruct path of longo root

Source:
Example
Longo.setRoot("/javascript/vender/longo");

<static> use(name) → {DB}

Alias for Longo.createDB().

Parameters:
Name Type Description
name String

database name

Source:
Returns:

db

Type
DB
Example
var db = Longo.use("School");
db.collection("students").insert({name:"tome",score:100}).done();

<static> useMinified()

Force to use minified longoWorker module.

Source: