You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-24Lines changed: 56 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,45 @@
1
1
# SQLClient-Swift
2
2
3
-
A Swift wrapper around FreeTDS (db-lib) for connecting to Microsoft SQL Server from macOS, iOS, and Linux.
3
+
A modern, high-performance Swift client for **Microsoft SQL Server**, built for macOS, iOS, and Linux.
4
+
5
+
This library is a lightweight Swift wrapper around the **FreeTDS (db-lib)** C library. It provides a clean, native Swift interface with full support for modern Swift features like `Async/Await`.
4
6
5
7
## Features
6
8
7
-
-**Async/Await Support**: Modern Swift concurrency support.
8
-
-**FreeTDS 1.x Compatible**: Supports modern SQL Server features like `DATETIME2`, `NVARCHAR(MAX)`, and encryption.
9
-
-**Robust Connection Handling**: Optimized for both Homebrew (macOS) and APT (Linux) builds of FreeTDS.
10
-
-**Backward Compatible**: Works with older FreeTDS versions by gracefully falling back on advanced features.
9
+
-**Modern Concurrency**: Full `Async/Await` support for non-blocking database operations.
10
+
-**Cross-Platform**: Works seamlessly on macOS (via Homebrew) and Linux (via APT).
11
+
-**FreeTDS 1.x Optimized**:
12
+
- Supports modern SQL Server types: `DATETIME2`, `NVARCHAR(MAX)`, `UNIQUEIDENTIFIER` (UUID), etc.
13
+
- Handles affected-row counts (`dbcount`) for DML operations.
14
+
- Support for named encryption modes (`off`, `request`, `require`, `strict` for TDS 8.0).
15
+
-**Robust & Compatible**:
16
+
- Automatically detects and handles different FreeTDS build modes (Sybase vs. Microsoft).
17
+
- Gracefully falls back on advanced features for older FreeTDS versions.
18
+
- Fixes the legacy "MONEY truncation" bug in older libraries.
19
+
-**Thread-Safe**: Uses internal serial dispatch queues to safely manage the underlying C state.
20
+
21
+
## Installation
11
22
12
-
##Requirements
23
+
### 1. Install FreeTDS
13
24
14
-
### macOS
15
-
- Install FreeTDS via Homebrew: `brew install freetds`
25
+
#### macOS (Homebrew)
26
+
```bash
27
+
brew install freetds
28
+
```
16
29
17
-
### Linux (Ubuntu/Debian)
18
-
- Install FreeTDS development files: `sudo apt-get install freetds-dev freetds-bin`
0 commit comments