The TableQuery class is used to create queries. Use the wire.data.select method to create TableQuery instances.

The following makes a call to a custom web service method GetUsers and returns the results into the data variable.

const accountService = new wire.data.DataSource("custom", {

const query = wire.data.select().from("GetUsers")

const data = accountService.exec(query);

TableQuery has many methods which allow a target data source to be queried. Check the target service provider documentation for details including support for TableQuery.

The full list of wire.data.select methods available is listed below.

  [.onValue(field, value)]
  [.where([custom expression])]
  [.orderBy(field, [desc])]

The following example selects the list of active users directly from a SQL database using the WireBootstrap Query Service.

const accountService = new wire.data.DataSource("table", {

const query = wire.data.select("UserName")
    .where().eq("Active", true);
const table = accountService.exec(query);

For more TableQuery examples, visit Creating Queries - Select Queries.

Last updated