Function parse_mediawiki_sql::iterate_sql_insertions
source · [−]pub fn iterate_sql_insertions<'input, Row>(
sql: &'input [u8]
) -> ParserIterator<&'input [u8], Error<'input>, impl FnMut(&'input [u8]) -> IResult<'input, Row>>where
Row: FromSqlTuple<'input> + 'input,
Expand description
The entry point of the crate. Takes a SQL dump of a MediaWiki database table as bytes and yields an iterator over structs representing rows in the table.
The return value is iterable as a mutable reference,
and when iterated it yields structs representing the database rows (Row
).
These rows are represented as tuples in the SQL code.
The tuples are parsed using FromSqlTuple::from_sql_tuple
and the fields in the tuples are parsed by FromSql::from_sql
.
See the example in the documentation, and see schemas
for the full list of possible Row
s.