Skip to content

Commit

Permalink
docs: Updated CHANGELOG.md and documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
emirror-de committed Feb 27, 2022
1 parent 4380e6f commit fd90339
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## v0.5.0

### New features

- `diesel::Pg` connection is now implemented

### Changes

* Updated examples to be able to use feature flags for the database selection

## v0.4.1

### New features
Expand Down Expand Up @@ -70,8 +80,11 @@ None
* Added `barrel` integration for `SQLite3`

* Added `SQLite3` support, backed by `diesel`

* Added an example for `SqliteConnection`

* Added possibility for `custom` queries

* Added possibility to change the model before and after updating it in the database by implementing the `DatabaseUpdateHandler` trait.

### Changes
Expand Down
2 changes: 2 additions & 0 deletions naphtha-proc-macro/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! This crate is a support crate that contains the necessary macros for naphtha to compile.
extern crate proc_macro;
extern crate quote;

Expand Down
11 changes: 7 additions & 4 deletions naphtha/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
//! * Change database on specific model in your application without the need to
//! change your code.
//! * Possibility to query a model from the database by using one of its member.
//! * Integrated [barrel] for writing your SQL migrations.
//! * Integrated [barrel] for writing your SQL migrations and the possibility to apply them during
//! runtime.
//! * Thread safe handling of the database connection.
//!
//! ## Supported databases
//!
//! * SQlite3 (using [diesel](diesel) under the hood).
//! * MySQL (using [diesel](diesel) under the hood).
//! * PostgreSQL (using [diesel](diesel) under the hood).
//!
//! ## Examples
//!
Expand All @@ -47,6 +49,7 @@
//! ### Defining a model and use database connection
//!
//! To create a model and its database integration, the following code is required.
//!
//! *Note that this is an excerpt, see the `examples` folder in the repository for
//! a full working example.*
//!
Expand All @@ -55,15 +58,15 @@
//! pub struct Person {
//! id: i32,
//! pub description: Option<String>,
pub updated_at: NaiveDateTime,
//! pub updated_at: NaiveDateTime,
//! }
//!
//! pub mod schema {
//! table! {
//! persons (id) {
//! id -> Int4,
//! description -> Nullable<Varchar>,
updated_at -> Timestamp,
//! updated_at -> Timestamp,
//! }
//! }
//! }
Expand Down Expand Up @@ -147,7 +150,7 @@ pub use naphtha_proc_macro::model;
feature = "barrel-mysql",
feature = "barrel-pg"
))]
/// Re-exports the [barrel] crate including small additions required by naphtha.
/// Re-exports the [barrel] crate including small trait additions required by naphtha.
pub mod barrel;
mod database_impl;
mod tests;
Expand Down

0 comments on commit fd90339

Please sign in to comment.