Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Feather Database

![DocC API documentation](https://img.shields.io/badge/DocC-API_documentation-F05138)
![Platforms: Linux, macOS, iOS, tvOS, watchOS, visionOS](https://img.shields.io/badge/Platforms-Linux_%7C_macOS_%7C_iOS_%7C_tvOS_%7C_watchOS_%7C_visionOS-F05138)
![Swift 6.1+](https://img.shields.io/badge/Swift-6%2E1%2B-F05138)
![Release: 1.0.0-beta.1](https://img.shields.io/badge/Release-1%2E0%2E0--beta%2E1-F05138)
Abstract database component, providing a shared API surface for database drivers written in Swift.

Abstract database component for Feather CMS, providing a shared API surface for database drivers written in Swift.
![Release: 1.0.0-beta.1](https://img.shields.io/badge/Release-1%2E0%2E0--beta%2E1-F05138)

## Features

- 🤝 Database-agnostic abstraction layer
- 🔀 Designed for modern Swift concurrency
- 📚 API Documentation is available using DocC
- ✅ Code coverage and unit tests
- 📚 DocC-based API Documentation
- ✅ Unit tests and code coverage

## Requirements

![Swift 6.1+](https://img.shields.io/badge/Swift-6%2E1%2B-F05138)
![Platforms: Linux, macOS, iOS, tvOS, watchOS, visionOS](https://img.shields.io/badge/Platforms-Linux_%7C_macOS_%7C_iOS_%7C_tvOS_%7C_watchOS_%7C_visionOS-F05138)

- Swift 6.1+
- Swift Package Manager

- Platforms:
- Linux
- macOS 15+
Expand All @@ -28,33 +28,48 @@ Abstract database component for Feather CMS, providing a shared API surface for

## Installation

Add the dependency to your `Package.swift`:
Use Swift Package Manager; add the dependency to your `Package.swift` file:

```swift
.package(url: "https://github.com/feather-framework/feather-database", exact: "1.0.0-beta.1")
.package(url: "https://github.com/feather-framework/feather-database", exact: "1.0.0-beta.1"),
```

Then add `FeatherDatabase` to your target dependencies:

```swift
.product(name: "FeatherDatabase", package: "feather-database")
.product(name: "FeatherDatabase", package: "feather-database"),
```

## Usage

![DocC API documentation](https://img.shields.io/badge/DocC-API_documentation-F05138)

API documentation is available at the following link. Refer to the mock objects in the Tests directory if you want to build a custom database driver implementation.

> [!TIP]
> Avoid calling `database.execute` while in a transaction; use the transaction `connection` instead.

> [!WARNING]
> This repository is a work in progress, things can break until it reaches v1.0.0.


## Database drivers

The following database driver implementations are available for use:

- [SQLite](https://github.com/feather-framework/feather-sqlite-database)
- [Postgres](https://github.com/feather-framework/feather-postgres-database)
- [MySQL](https://github.com/feather-framework/feather-mysql-database)

## Development

- Build: `swift build`
- Test: `swift test`
- Test:
- local: `swift test`
- using Docker: `swift docker-test`
- Format: `make format`
- Check: `make check`

## Contributing

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