mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 22:08:55 +08:00 
			
		
		
		
	Added documentation surrounding type conversion
This commit is contained in:
		| @@ -113,8 +113,8 @@ features](https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-s | ||||
|   and [`ToSql`](https://docs.rs/rusqlite/~0/rusqlite/types/trait.ToSql.html) for the | ||||
|   `Value` type from the [`serde_json` crate](https://crates.io/crates/serde_json). | ||||
| * `time` implements [`FromSql`](https://docs.rs/rusqlite/~0/rusqlite/types/trait.FromSql.html) | ||||
|    and [`ToSql`](https://docs.rs/rusqlite/~0/rusqlite/types/trait.ToSql.html) for the | ||||
|    `time::OffsetDateTime` type from the [`time` crate](https://crates.io/crates/time). | ||||
|   and [`ToSql`](https://docs.rs/rusqlite/~0/rusqlite/types/trait.ToSql.html) for various | ||||
|   types from the [`time` crate](https://crates.io/crates/time). | ||||
| * `url` implements [`FromSql`](https://docs.rs/rusqlite/~0/rusqlite/types/trait.FromSql.html) | ||||
|   and [`ToSql`](https://docs.rs/rusqlite/~0/rusqlite/types/trait.ToSql.html) for the | ||||
|   `Url` type from the [`url` crate](https://crates.io/crates/url). | ||||
|   | ||||
| @@ -1,4 +1,15 @@ | ||||
| //! Convert formats 1-10 in [Time Values](https://sqlite.org/lang_datefunc.html#time_values) to time types. | ||||
| //! [`ToSql`] and [`FromSql`] implementation for [`time::OffsetDateTime`]. | ||||
| //! [`ToSql`] and [`FromSql`] implementation for [`time::PrimitiveDateTime`]. | ||||
| //! [`ToSql`] and [`FromSql`] implementation for [`time::Date`]. | ||||
| //! [`ToSql`] and [`FromSql`] implementation for [`time::Time`]. | ||||
| //! Time Strings in: | ||||
| //!  - Format 2: "YYYY-MM-DD HH:MM" | ||||
| //!  - Format 5: "YYYY-MM-DDTHH:MM" | ||||
| //!  - Format 8: "HH:MM" | ||||
| //! without an explicit second value will assume 0 seconds. | ||||
| //! Time String that contain an optional timezone without an explicit date are unsupported. | ||||
| //! All other assumptions described in [Time Values](https://sqlite.org/lang_datefunc.html#time_values) section are unsupported. | ||||
|  | ||||
| use crate::types::{FromSql, FromSqlError, FromSqlResult, ToSql, ToSqlOutput, ValueRef}; | ||||
| use crate::{Error, Result}; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user