mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 13:58:55 +08:00 
			
		
		
		
	Doctest column name reference (#918)
* Doctest column name reference * Document rusqlite assumption on column name reference And move doctest as a test. * Document when columns metadata should be extracted. * Rustfmt doc (wrap_comments)
This commit is contained in:
		| @@ -2,8 +2,8 @@ | ||||
| //! | ||||
| //! Follow these steps to create your own virtual table: | ||||
| //! 1. Write implemenation of [`VTab`] and [`VTabCursor`] traits. | ||||
| //! 2. Create an instance of the [`Module`] structure specialized for [`VTab`] impl. | ||||
| //! from step 1. | ||||
| //! 2. Create an instance of the [`Module`] structure specialized for [`VTab`] | ||||
| //! impl. from step 1. | ||||
| //! 3. Register your [`Module`] structure using [`Connection::create_module`]. | ||||
| //! 4. Run a `CREATE VIRTUAL TABLE` command that specifies the new module in the | ||||
| //! `USING` clause. | ||||
| @@ -430,7 +430,8 @@ impl IndexConstraint<'_> { | ||||
| pub struct IndexConstraintUsage<'a>(&'a mut ffi::sqlite3_index_constraint_usage); | ||||
|  | ||||
| impl IndexConstraintUsage<'_> { | ||||
|     /// if `argv_index` > 0, constraint is part of argv to [`VTabCursor::filter`] | ||||
|     /// if `argv_index` > 0, constraint is part of argv to | ||||
|     /// [`VTabCursor::filter`] | ||||
|     #[inline] | ||||
|     pub fn set_argv_index(&mut self, argv_index: c_int) { | ||||
|         self.0.argvIndex = argv_index; | ||||
| @@ -496,8 +497,8 @@ pub unsafe trait VTabCursor: Sized { | ||||
|     /// Begin a search of a virtual table. | ||||
|     /// (See [SQLite doc](https://sqlite.org/vtab.html#the_xfilter_method)) | ||||
|     fn filter(&mut self, idx_num: c_int, idx_str: Option<&str>, args: &Values<'_>) -> Result<()>; | ||||
|     /// Advance cursor to the next row of a result set initiated by [`filter`](VTabCursor::filter). | ||||
|     /// (See [SQLite doc](https://sqlite.org/vtab.html#the_xnext_method)) | ||||
|     /// Advance cursor to the next row of a result set initiated by | ||||
|     /// [`filter`](VTabCursor::filter). (See [SQLite doc](https://sqlite.org/vtab.html#the_xnext_method)) | ||||
|     fn next(&mut self) -> Result<()>; | ||||
|     /// Must return `false` if the cursor currently points to a valid row of | ||||
|     /// data, or `true` otherwise. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user