Skip to content

piperRyan/rust-postgres-interval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status codecov

Rust-Postgres-Interval

A interval type for the postgres driver.

Contributing

There is a separate document on how to contribute to this repo here

Overview

Rust-Postgres-Interval is dedicated datatype for the postgres interval type.

extern crate pg_interval;

use pg_interval::Interval;

fn main() {
    let months = 13;
    let days = 1;
    let microseconds = 3600000000;
    let interval = Interval::new(months, days, microseconds);
    let output = interval.to_iso_8601();
    assert_eq!(String::from("P1Y1M1DT1H"), output);
}

Requirements

  • rust 1.22

Roadmap to 1.0.0

  • Implement method to covert interval into a sql compliant interval string
  • Parse iso 8601, postgre, and sql interval strings into interval
  • Support for nightly and beta
  • Basic chrono integration

About

An interval datatype for rust's PostgreSQL driver.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages