table method

Query<AdHocRow> table(
  1. String table, {
  2. String? as,
  3. String? schema,
  4. List<String>? scopes,
  5. List<AdHocColumn> columns = const [],
})

Builds a query against an arbitrary table name.

Useful for ad-hoc queries or tables without a model definition.

final rows = await ds.table('audit_logs')
    .whereEquals('action', 'login')
    .orderBy('timestamp', descending: true)
    .limit(100)
    .get();

Implementation

Query<AdHocRow> table(
  String table, {
  String? as,
  String? schema,
  List<String>? scopes,
  List<AdHocColumn> columns = const [],
}) {
  _ensureInitialized();
  return _connection!.table(
    table,
    as: as,
    schema: schema,
    scopes: scopes,
    columns: columns,
  );
}