knex_dart_mssql 0.1.0 copy "knex_dart_mssql: ^0.1.0" to clipboard
knex_dart_mssql: ^0.1.0 copied to clipboard

Microsoft SQL Server driver for knex_dart — execute queries against SQL Server via the mssql_connection FFI package (FreeTDS).

knex_dart_mssql #

Microsoft SQL Server driver for knex_dart using the mssql_connection FreeTDS-based runtime.

Pub Version License: MIT

Installation #

dependencies:
  knex_dart_mssql: ^0.1.0

Quick Start #

import 'package:knex_dart_mssql/knex_dart_mssql.dart';

final db = await KnexMssql.connect(
  host: 'localhost',
  database: 'AdventureWorks',
  username: 'sa',
  password: 's3cr3t!',
);

final rows = await db.select(
  db
      .queryBuilder()
      .table('users')
      .where('active', '=', 1)
      .orderBy('id')
      .limit(10),
);

await db.close();

Platform Requirements #

  • Native runtime only (uses FFI through mssql_connection).
  • FreeTDS installation is required:
    • macOS: brew install freetds
    • Ubuntu/Debian: sudo apt-get install -y freetds-dev libct4

Dialect Capabilities #

knex_dart_capabilities does not currently include a dedicated mssql dialect entry, so static capability checks are not available yet for SQL Server.

Implemented driver/compiler highlights:

  • MSSQL OFFSET ... FETCH NEXT ... pagination compilation for .limit() / .offset().
  • having(...) and havingRaw(...) compilation.
  • Window-function SQL generation from query builder methods.

Known Limitations #

  • No connection pooling in this driver (single shared connection runtime).
  • Underlying MssqlConnection is singleton-based; operations are effectively serialized.
  • SQL Server-specific bracket quoting ([col]) is not emitted by default query compiler; use raw() when exact bracketed SQL is needed.
  • Alias aggregate expressions (for example count(*) as total) so result keys are predictable.
0
likes
150
points
20
downloads

Documentation

API reference

Publisher

verified publishermahawarkartikey.in

Weekly Downloads

Microsoft SQL Server driver for knex_dart — execute queries against SQL Server via the mssql_connection FFI package (FreeTDS).

Repository (GitHub)
View/report issues
Contributing

Topics

#sql #query-builder #database #mssql #knex

License

MIT (license)

Dependencies

knex_dart, mssql_connection, universal_io

More

Packages that depend on knex_dart_mssql