WireBootstrap
HomeDocsBuySupport
  • Introduction
  • Overview
  • Getting Started
  • Installation
  • Connecting to Data
    • Data Connectors
      • SQL Data
      • Custom Web Services
      • Local Data
      • Other Sources
    • Data Sources
    • Discovery
    • Building a Data Connector
  • Working With Queries
    • Select Queries
      • Query Extensions
    • Stored Procedures
    • Custom Web Services
    • Executing Queries
    • ORM
  • Writing Data
  • Updates
  • Deletes
  • Working with DataTables
    • Introduction
    • Filter and Sort
    • Select and Calculate
    • Joins
    • Rows
    • Columns
  • Working with DataSets
  • Introduction
  • Executing Queries
  • Transforms
  • Writing Data
  • Data Events
  • Working with Components
    • Introduction
    • Encapsulation
    • Configuration
      • Data
      • Events
      • Observables
      • Validation
      • Display
      • Vendor
      • Custom
    • Component
    • Web Frameworks
    • Building a Component
      • Hello World
      • Data Events
      • DataSets
  • Working With Data Events
    • Introduction
    • Event Basics
    • Event Data
    • Event Actions
  • Working with Themes
    • Introduction
    • Sample Data
    • Libraries
    • Pages
    • Building a Theme Project
  • Utilities
    • Formatting
    • Expressions
    • Collections
    • Spinners
    • Copy and Merge
    • Validation
    • Loading Assets
    • Service Calls
    • Download Files
    • Browser Location
    • Types
    • Promise
  • Reference
    • wire
      • wire.Collection
      • wire.download
      • wire.validate
    • wire.data
      • wire.data.DataEvent
      • wire.data.DataModel
      • wire.data.DataPromise
      • wire.data.DataSet
      • wire.data.DataSource
      • wire.data.DataTable
        • Columns
        • Rows
      • wire.data.StoredProcedure
      • wire.data.TableQuery
    • wire.ui
      • wire.ui.Component
      • wire.ui.validate
Powered by GitBook
On this page

Was this helpful?

  1. Reference
  2. wire.data

wire.data.TableQuery

Previouswire.data.StoredProcedureNextwire.ui

Last updated 1 year ago

Was this helpful?

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 documentation for details including support for TableQuery.

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

 wire.data.select([fields])
 
  [.top(number)]
  [.distinct()]
  [.field(field)]
    [.eventName(name)]
 
  .from([entity])
 
  [.join(entity)]
  [.leftJoin](entity)]
  [.rightJoin](entity)]
  [.on(entity,field)]
  [.onValue(field, value)]
 
  [.where([custom expression])]
    [.expression(expression)]
    [.eq(field,value)]
    [.ne(field,value)]
    [.in(field,[values])]
    [.between(field,value1,value2)]
    [.starts(field,value)]
    [.contains(field,value)];
    
  [.groupBy(fields)]
  [.orderBy(field, [desc])]
const accountService = new wire.data.DataSource("table", {
    ...
});

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

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

For more TableQuery examples, visit .

service provider
WireBootstrap Query Service
Creating Queries - Select Queries