/// Errors related to parameter validation like the base IRI use the [`InvalidInput`](std::io::ErrorKind::InvalidInput) error kind.
/// Errors related to a bad syntax in the loaded file use the [`InvalidData`](std::io::ErrorKind::InvalidData) or [`UnexpectedEof`](std::io::ErrorKind::UnexpectedEof) error kinds.
@ -339,13 +401,28 @@ impl SledStore {
/// Loads a dataset file (i.e. quads) into the store.
///
/// Warning: This functions saves the triples in a not atomic way. If the parsing fails in the middle of the file,
/// only a part of it may be written to the store.
/// Also, this method is optimized for performances and is not atomic.
/// Warning: This functions saves the triples in a not atomic way.
/// If the parsing fails in the middle of the file, only a part of it may be written to the store.
/// It might leave the store in a bad state if a crash happens during a quad insertion.
/// Use a (memory greedy) [transaction](SledStore::transaction()) if you do not want that.
///
/// See [`MemoryStore`](super::memory::MemoryStore::load_dataset()) for a usage example.
/// Usage example:
/// ```
/// use oxigraph::SledStore;
/// use oxigraph::io::DatasetFormat;
/// use oxigraph::model::*;
///
/// let store = SledStore::new()?;
///
/// // insertion
/// let file = b"<http://example.com> <http://example.com> <http://example.com> <http://example.com> .";
/// Errors related to parameter validation like the base IRI use the [`InvalidInput`](std::io::ErrorKind::InvalidInput) error kind.
/// Errors related to a bad syntax in the loaded file use the [`InvalidData`](std::io::ErrorKind::InvalidData) or [`UnexpectedEof`](std::io::ErrorKind::UnexpectedEof) error kinds.
@ -388,7 +465,22 @@ impl SledStore {
/// Dumps a store graph into a file.
///
/// See [`MemoryStore`](super::memory::MemoryStore::dump_graph()) for a usage example.
/// Usage example:
/// ```
/// use oxigraph::SledStore;
/// use oxigraph::io::GraphFormat;
/// use oxigraph::model::GraphName;
///
/// let file = "<http://example.com> <http://example.com> <http://example.com> .\n".as_bytes();
/// If the file parsing fails in the middle of the file, the triples read before are still
/// considered by the transaction. Rollback the transaction by making the transaction closure
/// return an error if you don't want that.
/// Moving up the parsing error through the transaction is enough to do that.
///
/// Errors related to parameter validation like the base IRI use the [`InvalidInput`](std::io::ErrorKind::InvalidInput) error kind.
/// Errors related to a bad syntax in the loaded file use the [`InvalidData`](std::io::ErrorKind::InvalidData) or [`UnexpectedEof`](std::io::ErrorKind::UnexpectedEof) error kinds.
@ -1015,11 +1216,32 @@ impl SledTransaction<'_> {
/// the full file content might be temporarily stored in main memory.
/// Do not use for big files.
///
/// See [`MemoryTransaction`](super::memory::MemoryTransaction::load_dataset()) for a usage example.
/// Usage example:
/// ```
/// use oxigraph::SledStore;
/// use oxigraph::io::DatasetFormat;
/// use oxigraph::model::*;
/// use oxigraph::store::sled::SledConflictableTransactionError;
///
/// let store = SledStore::new()?;
///
/// // insertion
/// let file = b"<http://example.com> <http://example.com> <http://example.com> <http://example.com> .";
/// If the file parsing fails in the middle of the file, the quads read before are still
/// considered by the transaction. Rollback the transaction by making the transaction closure
/// return an error if you don't want that.
/// Moving up the parsing error through the transaction is enough to do that.
///
/// Errors related to parameter validation like the base IRI use the [`InvalidInput`](std::io::ErrorKind::InvalidInput) error kind.
/// Errors related to a bad syntax in the loaded file use the [`InvalidData`](std::io::ErrorKind::InvalidData) or [`UnexpectedEof`](std::io::ErrorKind::UnexpectedEof) error kinds.