#![allow(unsafe_code)]
use crate::dd::ffi;
use crate::sys::{DdColumn, DdIndex, DdTable};
impl DdTable {
#[must_use]
pub fn column_count(&self) -> usize {
let p: *const DdTable = self;
unsafe { ffi::mysql__DdTable__column_count(p) }
}
#[must_use]
pub fn column_at(&self, i: usize) -> Option<&DdColumn> {
let p: *const DdTable = self;
let raw = unsafe { ffi::mysql__DdTable__column_at(p, i) };
unsafe { raw.as_ref() }
}
#[must_use]
pub fn index_count(&self) -> usize {
let p: *const DdTable = self;
unsafe { ffi::mysql__DdTable__index_count(p) }
}
#[must_use]
pub fn index_at(&self, i: usize) -> Option<&DdIndex> {
let p: *const DdTable = self;
let raw = unsafe { ffi::mysql__DdTable__index_at(p, i) };
unsafe { raw.as_ref() }
}
}