use std::path::Path;
pub struct Store;
impl Store {
pub fn open(_path: &Path) -> Result<Self, Box<dyn std::error::Error>> {
Ok(Store)
}
pub fn create(_path: &Path) -> Result<Self, Box<dyn std::error::Error>> {
Ok(Store)
}
pub fn close(self) -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
pub fn query(&self, _query: &str) -> Result<OxirsQueryResults, Box<dyn std::error::Error>> {
Ok(OxirsQueryResults::new())
}
pub fn update(&self, _update: &str) -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
pub fn insert(&mut self, _data: Vec<Statement>) -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
}
pub struct OxirsQueryResults {
pub bindings: Vec<Binding>,
pub variables: Vec<String>,
}
impl Default for OxirsQueryResults {
fn default() -> Self {
Self::new()
}
}
impl OxirsQueryResults {
pub fn new() -> Self {
Self {
bindings: vec![],
variables: vec![],
}
}
}
pub struct Binding {
pub values: Vec<Option<String>>,
}
pub struct Statement;
pub mod rdf {
pub fn parse_file(
_path: &super::Path,
_format: &str,
) -> Result<Vec<super::Statement>, Box<dyn std::error::Error>> {
Ok(vec![])
}
pub struct Statement;
}
pub mod sparql {
use super::Store;
pub fn execute_query(
_store: &Store,
_query: &str,
) -> Result<QueryResults, Box<dyn std::error::Error>> {
Ok(QueryResults::new())
}
pub fn execute_update(_store: &Store, _update: &str) -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
pub struct QueryResults {
pub bindings: Vec<Binding>,
}
impl Default for QueryResults {
fn default() -> Self {
Self::new()
}
}
impl QueryResults {
pub fn new() -> Self {
Self { bindings: vec![] }
}
}
pub struct Binding;
}