db.countItems

Syntax db.countItems (f, path)

Params f is a filespec or path string of a Frontier object database file that has been opened with db.open.

path is a valid UserTalk address string, indicating the location in the database of a table whose contents you wish to examine.

Action Examines the table in the location indicated by path and returns the number of the items that it contains.

Returns The number of the items in the table.

Examples db.countItems ("System:Frontier:old.root", "examples")

   » 55

db.countItems ("System:Frontier:old.root", "examples.age")

   » error: "The address of a table was expected here."

Notes The database file specified in the parameter "f" must be opened using db.open before calling this verb.

path can be a full or partial database address; the paths table of the target database is used to interpret it.

db.countItems (f, path) is equivalent to sizeOf (path^) when referring to a table in Frontier's current object database.

See Also db.open

db.isTable

db.getNthItem

sizeOf

Discuss