Skip to content
tashda edited this page Mar 9, 2026 · 2 revisions

SQLServerNIO Documentation

Welcome to the SQLServerNIO Wiki!

SQLServerNIO is a fast, non-blocking Swift client for Microsoft SQL Server, built on the Apple SwiftNIO ecosystem. It provides direct connection management, a comprehensive async/await interface, robust connection pooling, and a vast array of high-level management tools typically reserved for SSMS (SQL Server Management Studio).

Whether you are building a small backend application or a massive enterprise service, SQLServerNIO gives you complete control over your SQL Server instance natively from Swift.


Table of Contents

  • 🚀 Getting Started

    • Installation and Package setup.
    • Creating connection configurations.
    • Connecting using pooled clients vs. direct connections.
  • 🛠 Core Operations

    • Executing standard queries, batch statements, and scripts.
    • Transaction management and Savepoints.
    • Using AsyncSequence streams for large result sets.
    • Calling stored procedures and retrieving returned values.
  • 📊 Metadata APIs

    • Comprehensive programmatic introspection of your database.
    • Fetching definitions for Tables, Views, Columns, Constraints, Indexes, Routines, and Triggers.
    • Retrieving extended properties (comments).
  • ⚙️ Administration & Schema

    • Creating and altering tables, views, and indexes programmatically.
    • Managing foreign keys, unique constraints, and check constraints.
    • Managing bulk data inserts using SQLServerBulkCopyClient.
  • 🛡 Security Parity

    • Managing Server-level security: Logins, Server Roles, and Credentials.
    • Managing Database-level security: Users, Database Roles, Application Roles.
    • Granular GRANT/REVOKE/DENY permissions down to the column and schema levels.
  • 🤖 SQL Server Agent

    • Comprehensive, programmatic control of the SQL Server Agent.
    • Managing Jobs, Steps, Schedules, Alerts, Operators, and Proxies.
  • 🔬 Advanced Topics

    • Accessing the SSMS-style Activity Monitor.
    • Tuning Session Options and Execution Modes.
    • EventLoopFuture APIs.

Clone this wiki locally