public void EnsureIndex(EJDB2Handle handle, string collection, string path, ejdb_idx_mode_t mode) { if (handle.IsInvalid) { throw new ArgumentException("Invalid DB handle."); } if (handle.IsClosed) { throw new ArgumentException("DB handle is closed."); } if (collection == null) { throw new ArgumentNullException(nameof(collection)); } if (path == null) { throw new ArgumentNullException(nameof(path)); } ulong rc; using (var pool = new Utf8StringPool()) { rc = _helper.ejdb_ensure_index(handle.DangerousGetHandle(), pool.GetString(collection), pool.GetString(path), mode); } if (rc != 0) { throw _e.CreateException(rc); } }
public ulong ejdb_remove_index(IntPtr db, IntPtr coll, IntPtr path, ejdb_idx_mode_t mode) => Interop.ejdb_remove_index(db, coll, path, mode);
public static extern ulong ejdb_remove_index( IntPtr db, IntPtr coll, IntPtr path, ejdb_idx_mode_t mode);