Skip to content

Commit e38509d

Browse files
authored
Apply naming conventions (#14)
- apply naming conventions - merged test suite extension - readme updates & fixes
1 parent 6f641bb commit e38509d

17 files changed

+224
-220
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ test:
4444
swift test --parallel
4545

4646
docker-test:
47-
docker build -t feather-sqlite-database-tests . -f ./docker/tests/Dockerfile && docker run --rm feather-sqlite-database-tests
47+
docker build -t feather-database-sqlite-tests . -f ./docker/tests/Dockerfile && docker run --rm feather-database-sqlite-tests

Package.resolved

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var defaultSwiftSettings: [SwiftSetting] =
1111
// https://forums.swift.org/t/experimental-support-for-lifetime-dependencies-in-swift-6-2-and-beyond/78638
1212
.enableExperimentalFeature("Lifetimes"),
1313
// https://github.com/swiftlang/swift/pull/65218
14-
.enableExperimentalFeature("AvailabilityMacro=featherSQLiteDatabase 1.0:macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0"),
14+
.enableExperimentalFeature("AvailabilityMacro=FeatherDatabaseSQLite 1.0:macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0"),
1515
]
1616

1717
#if compiler(>=6.2)
@@ -23,7 +23,7 @@ defaultSwiftSettings.append(
2323

2424

2525
let package = Package(
26-
name: "feather-sqlite-database",
26+
name: "feather-database-sqlite",
2727
platforms: [
2828
.macOS(.v15),
2929
.iOS(.v18),
@@ -32,7 +32,7 @@ let package = Package(
3232
.visionOS(.v2),
3333
],
3434
products: [
35-
.library(name: "FeatherSQLiteDatabase", targets: ["FeatherSQLiteDatabase"]),
35+
.library(name: "FeatherDatabaseSQLite", targets: ["FeatherDatabaseSQLite"]),
3636
],
3737
traits: [
3838
"ServiceLifecycleSupport",
@@ -59,7 +59,7 @@ let package = Package(
5959
swiftSettings: defaultSwiftSettings
6060
),
6161
.target(
62-
name: "FeatherSQLiteDatabase",
62+
name: "FeatherDatabaseSQLite",
6363
dependencies: [
6464
.target(name: "SQLiteNIOExtras"),
6565
.product(name: "FeatherDatabase", package: "feather-database"),
@@ -79,9 +79,9 @@ let package = Package(
7979
swiftSettings: defaultSwiftSettings
8080
),
8181
.testTarget(
82-
name: "FeatherSQLiteDatabaseTests",
82+
name: "FeatherDatabaseSQLiteTests",
8383
dependencies: [
84-
.target(name: "FeatherSQLiteDatabase"),
84+
.target(name: "FeatherDatabaseSQLite"),
8585
.product(
8686
name: "ServiceLifecycleTestKit",
8787
package: "swift-service-lifecycle",

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Feather SQLite Database
1+
# Feather Database SQLite
22

33
SQLite driver implementation for the abstract [Feather Database](https://github.com/feather-framework/feather-database) Swift API package.
44

55
[
6-
![Release: 1.0.0-beta.7](https://img.shields.io/badge/Release-1%2E0%2E0--beta%2E7-F05138)
6+
![Release: 1.0.0-beta.8](https://img.shields.io/badge/Release-1%2E0%2E0--beta%2E8-F05138)
77
](
8-
https://github.com/feather-framework/feather-sqlite-database/releases/tag/1.0.0-beta.7
8+
https://github.com/feather-framework/feather-database-sqlite/releases/tag/1.0.0-beta.8
99
)
1010

1111
## Features
@@ -36,13 +36,13 @@ SQLite driver implementation for the abstract [Feather Database](https://github.
3636
Add the dependency to your `Package.swift`:
3737

3838
```swift
39-
.package(url: "https://github.com/feather-framework/feather-sqlite-database", exact: "1.0.0-beta.5"),
39+
.package(url: "https://github.com/feather-framework/feather-database-sqlite", exact: "1.0.0-beta.8"),
4040
```
4141

42-
Then add `FeatherSQLiteDatabase` to your target dependencies:
42+
Then add `FeatherDatabaseSQLite` to your target dependencies:
4343

4444
```swift
45-
.product(name: "FeatherSQLiteDatabase", package: "feather-sqlite-database"),
45+
.product(name: "FeatherDatabaseSQLite", package: "feather-database-sqlite"),
4646
```
4747

4848
### Package traits
@@ -52,8 +52,8 @@ To enable an additional trait on the package, update the package dependency:
5252

5353
```diff
5454
.package(
55-
url: "https://github.com/feather-framework/feather-sqlite-database",
56-
exact: "1.0.0-beta.4",
55+
url: "https://github.com/feather-framework/feather-database-sqlite",
56+
exact: "1.0.0-beta.8",
5757
+ traits: [
5858
+ .defaults,
5959
+ "ServiceLifecycleSupport",
@@ -63,7 +63,7 @@ To enable an additional trait on the package, update the package dependency:
6363

6464
Available traits:
6565

66-
- `ServiceLifecycleSupport` (default): Adds support for `SQLiteClientService`, a `ServiceLifecycle.Service` implementation for managing SQLite clients.
66+
- `ServiceLifecycleSupport` (default): Adds support for `DatabaseServiceSQLite`, a `ServiceLifecycle.Service` implementation for managing SQLite clients.
6767

6868

6969
## Usage
@@ -73,16 +73,17 @@ API documentation is available at the link below:
7373
[
7474
![DocC API documentation](https://img.shields.io/badge/DocC-API_documentation-F05138)
7575
](
76-
https://feather-framework.github.io/feather-sqlite-database/
76+
https://feather-framework.github.io/feather-database-sqlite/
7777
)
7878

7979
Here is a brief example:
8080

8181
```swift
8282
import Logging
8383
import SQLiteNIO
84+
import SQLiteNIOExtras
8485
import FeatherDatabase
85-
import FeatherSQLiteDatabase
86+
import FeatherDatabaseSQLite
8687

8788
var logger = Logger(label: "example")
8889
logger.logLevel = .info
@@ -94,7 +95,7 @@ let configuration = SQLiteClient.Configuration(
9495

9596
let client = SQLiteClient(configuration: configuration)
9697

97-
let database = SQLiteDatabaseClient(
98+
let database = DatabaseClientSQLite(
9899
client: client,
99100
logger: logger
100101
)
@@ -127,8 +128,8 @@ await client.shutdown()
127128

128129
The following database driver implementations are available for use:
129130

130-
- [Postgres](https://github.com/feather-framework/feather-postgres-database)
131-
- [MySQL](https://github.com/feather-framework/feather-mysql-database)
131+
- [Postgres](https://github.com/feather-framework/feather-database-postgres)
132+
- [MySQL](https://github.com/feather-framework/feather-database-mysql)
132133

133134
## Development
134135

@@ -141,4 +142,4 @@ The following database driver implementations are available for use:
141142

142143
## Contributing
143144

144-
[Pull requests](https://github.com/feather-framework/feather-sqlite-database/pulls) are welcome. Please keep changes focused and include tests for new logic.
145+
[Pull requests](https://github.com/feather-framework/feather-database-sqlite/pulls) are welcome. Please keep changes focused and include tests for new logic.

Sources/FeatherSQLiteDatabase/SQLiteDatabaseClient.swift renamed to Sources/FeatherDatabaseSQLite/DatabaseClientSQLite.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
2-
// SQLiteDatabaseClient.swift
3-
// feather-sqlite-database
2+
// DatabaseClientSQLite.swift
3+
// feather-database-sqlite
44
//
55
// Created by Tibor Bödecs on 2026. 01. 10..
66
//
@@ -12,9 +12,9 @@ import SQLiteNIOExtras
1212
/// A SQLite-backed database client.
1313
///
1414
/// Use this client to execute queries and manage transactions on SQLite.
15-
public struct SQLiteDatabaseClient: DatabaseClient {
15+
public struct DatabaseClientSQLite: DatabaseClient {
1616

17-
public typealias Connection = SQLiteDatabaseConnection
17+
public typealias Connection = DatabaseConnectionSQLite
1818

1919
let client: SQLiteClient
2020
var logger: Logger
@@ -47,7 +47,7 @@ public struct SQLiteDatabaseClient: DatabaseClient {
4747
do {
4848
return try await client.withConnection { connection in
4949
try await closure(
50-
SQLiteDatabaseConnection(
50+
DatabaseConnectionSQLite(
5151
connection: connection,
5252
logger: logger
5353
)
@@ -72,7 +72,7 @@ public struct SQLiteDatabaseClient: DatabaseClient {
7272
do {
7373
return try await client.withTransaction { connection in
7474
try await closure(
75-
SQLiteDatabaseConnection(
75+
DatabaseConnectionSQLite(
7676
connection: connection,
7777
logger: logger
7878
)
@@ -81,7 +81,7 @@ public struct SQLiteDatabaseClient: DatabaseClient {
8181
}
8282
catch let error as SQLiteTransactionError {
8383
throw .transaction(
84-
SQLiteDatabaseTransactionError(
84+
DatabaseTransactionErrorSQLite(
8585
underlyingError: error
8686
)
8787
)

Sources/FeatherSQLiteDatabase/SQLiteDatabaseConnection.swift renamed to Sources/FeatherDatabaseSQLite/DatabaseConnectionSQLite.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
2-
// SQLiteDatabaseConnection.swift
3-
// feather-sqlite-database
2+
// DatabaseConnectionSQLite.swift
3+
// feather-database-sqlite
44
//
55
// Created by Tibor Bödecs on 2026. 01. 10.
66
//
@@ -45,9 +45,9 @@ extension DatabaseQuery {
4545
}
4646
}
4747

48-
public struct SQLiteDatabaseConnection: DatabaseConnection {
48+
public struct DatabaseConnectionSQLite: DatabaseConnection {
4949

50-
public typealias RowSequence = SQLiteDatabaseRowSequence
50+
public typealias RowSequence = DatabaseRowSequenceSQLite
5151

5252
var connection: SQLiteConnection
5353
public var logger: Logger
@@ -72,7 +72,7 @@ public struct SQLiteDatabaseConnection: DatabaseConnection {
7272
sqliteQuery.bindings
7373
)
7474
return try await handler(
75-
SQLiteDatabaseRowSequence(
75+
DatabaseRowSequenceSQLite(
7676
elements: result.map {
7777
.init(row: $0)
7878
}

Sources/FeatherSQLiteDatabase/SQLiteDatabaseRow.swift renamed to Sources/FeatherDatabaseSQLite/DatabaseRowSQLite.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
//
2-
// SQLiteDatabaseRow.swift
3-
// feather-sqlite-database
2+
// DatabaseRowSQLite.swift
3+
// feather-database-sqlite
44
//
55
// Created by Tibor Bödecs on 2026. 01. 10.
66
//
77

88
import FeatherDatabase
99
import SQLiteNIO
1010

11-
public struct SQLiteDatabaseRow: DatabaseRow {
11+
public struct DatabaseRowSQLite: DatabaseRow {
1212
var row: SQLiteRow
1313

1414
struct SingleValueDecoder: Decoder, SingleValueDecodingContainer {

Sources/FeatherSQLiteDatabase/SQLiteDatabaseRowSequence.swift renamed to Sources/FeatherDatabaseSQLite/DatabaseRowSequenceSQLite.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
2-
// SQLiteDatabaseRowSequence.swift
3-
// feather-sqlite-database
2+
// DatabaseRowSequenceSQLite.swift
3+
// feather-database-sqlite
44
//
55
// Created by Tibor Bödecs on 2026. 01. 10.
66
//
@@ -11,8 +11,8 @@ import SQLiteNIO
1111
/// A query result backed by SQLite rows.
1212
///
1313
/// Use this type to iterate or collect SQLite query results.
14-
public struct SQLiteDatabaseRowSequence: DatabaseRowSequence {
15-
public typealias Row = SQLiteDatabaseRow
14+
public struct DatabaseRowSequenceSQLite: DatabaseRowSequence {
15+
public typealias Row = DatabaseRowSQLite
1616

1717
let elements: [Row]
1818

Sources/FeatherSQLiteDatabase/SQLiteDatabaseService.swift renamed to Sources/FeatherDatabaseSQLite/DatabaseServiceSQLite.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
2-
// SQLiteDatabaseService.swift
3-
// feather-sqlite-database
2+
// DatabaseServiceSQLite.swift
3+
// feather-database-sqlite
44
//
55
// Created by Tibor Bödecs on 2026. 01. 29..
66
//
@@ -11,7 +11,7 @@ import SQLiteNIOExtras
1111
import ServiceLifecycle
1212

1313
/// A `Service` wrapper around an `SQLiteClient`.
14-
public struct SQLiteDatabaseService: Service {
14+
public struct DatabaseServiceSQLite: Service {
1515

1616
/// The underlying SQLite client instance.
1717
public var client: SQLiteClient

Sources/FeatherSQLiteDatabase/SQLiteDatabaseTransactionError.swift renamed to Sources/FeatherDatabaseSQLite/DatabaseTransactionErrorSQLite.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
2-
// SQLiteDatabaseTransactionError.swift
3-
// feather-sqlite-database
2+
// DatabaseTransactionErrorSQLite.swift
3+
// feather-database-sqlite
44
//
55
// Created by Tibor Bödecs on 2026. 01. 10.
66
//
@@ -11,7 +11,7 @@ import SQLiteNIOExtras
1111
/// Transaction error details for SQLite operations.
1212
///
1313
/// Use this to capture errors from transaction phases.
14-
public struct SQLiteDatabaseTransactionError: DatabaseTransactionError {
14+
public struct DatabaseTransactionErrorSQLite: DatabaseTransactionError {
1515

1616
var underlyingError: SQLiteTransactionError
1717

0 commit comments

Comments
 (0)