MCPcopy Create free account
hub / github.com/asg017/sqlite-loadable-rs / column

Method column

examples/characters.rs:126–146  ·  view source on GitHub ↗
(&self, context: *mut sqlite3_context, i: i32)

Source from the content-addressed store, hash-verified

124 }
125
126 fn column(&self, context: *mut sqlite3_context, i: i32) -> Result<()> {
127 match column(i) {
128 Some(Columns::Value) => {
129 api::result_text(
130 context,
131 self.characters
132 .as_ref()
133 .unwrap()
134 .get(self.idx)
135 .unwrap()
136 .to_string()
137 .as_str(),
138 )?;
139 }
140 Some(Columns::Input) => {
141 api::result_text(context, self.input.as_ref().unwrap())?;
142 }
143 _ => (),
144 }
145 Ok(())
146 }
147
148 fn rowid(&self) -> Result<i64> {
149 Ok(self.idx as i64)

Callers

nothing calls this directly

Calls 3

result_textFunction · 0.85
getMethod · 0.80
columnFunction · 0.70

Tested by

no test coverage detected