mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 00:39:20 +08:00
Replace pub(crate) by pub(super) visibilty
This commit is contained in:
parent
65ef2224b6
commit
ceb9f11de8
@ -39,7 +39,7 @@ impl Statement<'_> {
|
|||||||
self.stmt.column_count()
|
self.stmt.column_count()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn column_name_unwrap(&self, col: usize) -> &str {
|
pub(super) fn column_name_unwrap(&self, col: usize) -> &str {
|
||||||
// Just panic if the bounds are wrong for now, we never call this
|
// Just panic if the bounds are wrong for now, we never call this
|
||||||
// without checking first.
|
// without checking first.
|
||||||
self.column_name(col).expect("Column out of bounds")
|
self.column_name(col).expect("Column out of bounds")
|
||||||
|
@ -12,7 +12,7 @@ use crate::types::{ToSqlOutput, ValueRef};
|
|||||||
#[cfg(feature = "array")]
|
#[cfg(feature = "array")]
|
||||||
use crate::vtab::array::{free_array, ARRAY_TYPE};
|
use crate::vtab::array::{free_array, ARRAY_TYPE};
|
||||||
|
|
||||||
pub(crate) unsafe fn set_result(ctx: *mut sqlite3_context, result: &ToSqlOutput<'_>) {
|
pub(super) unsafe fn set_result(ctx: *mut sqlite3_context, result: &ToSqlOutput<'_>) {
|
||||||
let value = match *result {
|
let value = match *result {
|
||||||
ToSqlOutput::Borrowed(v) => v,
|
ToSqlOutput::Borrowed(v) => v,
|
||||||
ToSqlOutput::Owned(ref v) => ValueRef::from(v),
|
ToSqlOutput::Owned(ref v) => ValueRef::from(v),
|
||||||
|
@ -731,11 +731,11 @@ impl Drop for Statement<'_> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Statement<'_> {
|
impl Statement<'_> {
|
||||||
pub(crate) fn new(conn: &Connection, stmt: RawStatement) -> Statement<'_> {
|
pub(super) fn new(conn: &Connection, stmt: RawStatement) -> Statement<'_> {
|
||||||
Statement { conn, stmt }
|
Statement { conn, stmt }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn value_ref(&self, col: usize) -> ValueRef<'_> {
|
pub(super) fn value_ref(&self, col: usize) -> ValueRef<'_> {
|
||||||
let raw = unsafe { self.stmt.ptr() };
|
let raw = unsafe { self.stmt.ptr() };
|
||||||
|
|
||||||
match self.stmt.column_type(col) {
|
match self.stmt.column_type(col) {
|
||||||
@ -791,7 +791,7 @@ impl Statement<'_> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn step(&self) -> Result<bool> {
|
pub(super) fn step(&self) -> Result<bool> {
|
||||||
match self.stmt.step() {
|
match self.stmt.step() {
|
||||||
ffi::SQLITE_ROW => Ok(true),
|
ffi::SQLITE_ROW => Ok(true),
|
||||||
ffi::SQLITE_DONE => Ok(false),
|
ffi::SQLITE_DONE => Ok(false),
|
||||||
@ -799,7 +799,7 @@ impl Statement<'_> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn reset(&self) -> c_int {
|
pub(super) fn reset(&self) -> c_int {
|
||||||
self.stmt.reset()
|
self.stmt.reset()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -542,7 +542,7 @@ impl Values<'_> {
|
|||||||
// `sqlite3_value_type` returns `SQLITE_NULL` for pointer.
|
// `sqlite3_value_type` returns `SQLITE_NULL` for pointer.
|
||||||
// So it seems not possible to enhance `ValueRef::from_value`.
|
// So it seems not possible to enhance `ValueRef::from_value`.
|
||||||
#[cfg(feature = "array")]
|
#[cfg(feature = "array")]
|
||||||
pub(crate) fn get_array(&self, idx: usize) -> Result<Option<array::Array>> {
|
fn get_array(&self, idx: usize) -> Result<Option<array::Array>> {
|
||||||
use crate::types::Value;
|
use crate::types::Value;
|
||||||
let arg = self.args[idx];
|
let arg = self.args[idx];
|
||||||
let ptr = unsafe { ffi::sqlite3_value_pointer(arg, array::ARRAY_TYPE) };
|
let ptr = unsafe { ffi::sqlite3_value_pointer(arg, array::ARRAY_TYPE) };
|
||||||
|
Loading…
Reference in New Issue
Block a user