wp_query_rs 0.4.1

A rust implementation of the classic WP_Query utility to access WordPress posts outside of a WordPress environment.
Documentation
1
2
3
4
5
6
7
8
9
10
use wp_query_rs::*;

#[test]
fn select_by_post_id() {
    let params = ParamBuilder::new().s("a");

    let posts = WP_Query::new(params).expect("SqlFailed");
    assert!(posts.post_count() > 0);
    assert!(posts.posts.iter().all(|p| p.post_content.contains("a")));
}