Classes

Classes( [database] )
Classes( [database] )
Classes( [database] )
client.query(Classes( [database] )
classes( [database] )
classes [database]
client.query(Classes( [database] )
Classes( [database] )

Description

The Classes function when executed with Paginate returns an array of Refs for all classes in the database specified. If no database is provided, it returns an array of references to all classes in the current database.

Parameters

Argument Type Definition and Requirements

database

Ref

Optional - The target database.

Returns

A schema set reference.

Examples

The query below gets the references to all classes in the current database.

curl https://db.fauna.com/ \
    -u fnAChGwBcAACAO70ziE0cfROosNJHdgBmJU1PgpL: \
    -d '{ "paginate": { "classes": null } }'
client.Query(Paginate(Classes()));
System.out.println(client.query(Paginate(Classes())).get());
result, _ := client.Query(f.Paginate(f.Classes()))

fmt.Println(result)
client.query(Paginate(Classes()))
client.query(q.paginate(q.classes()))
$client.query do
  paginate classes
end
client.query(Paginate(Classes()))
client.query(q.Paginate(q.Classes()))
  .then((ret) => console.log(ret))
HTTP/1.1 200 OK
{ "resource": [{ "@ref": "classes/spells" }] }
[{ "@ref": "classes/spells" }]
[ref(id = "spells", class = ref(id = "classes"))]
[{spells 0xc4202cf140 <nil>}]
[{ "@ref": "classes/spells" }]
[{ "@ref": "classes/spells" }]
[{ "@ref": "classes/spells" }]
[{ "@ref": "classes/spells" }]
[Ref(id=spells, class=Ref(id=classes))]