/// <summary> /// Returns <c>sqlite3_column_text(column)</c> as string. /// </summary> public string GetText(SLIndexOrName column) { int icol = _C(column); if (_db.IsUtf16) //both these codes would work, but with long strings can be significantly slower if SQLite has to convert text encoding { char *t = SLApi.sqlite3_column_text16(_st, icol); if (t != null) { return(new string(t, 0, SLApi.sqlite3_column_bytes16(_st, icol))); } } else { byte *t = SLApi.sqlite3_column_text(_st, icol); if (t != null) { return(AConvert.FromUtf8(t, SLApi.sqlite3_column_bytes(_st, icol))); } } _WarnGet(); return(null); }
/// <summary> /// sqlite3_column_name. /// </summary> public string ColumnName(int index) => AConvert.FromUtf8(SLApi.sqlite3_column_name(_st, index));