1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "IDBObjectStore",
10 typescript_type = "IDBObjectStore"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `IdbObjectStore` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
18 pub type IdbObjectStore;
19 #[wasm_bindgen(method, getter, js_class = "IDBObjectStore", js_name = "name")]
20 #[doc = "Getter for the `name` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/name)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
25 pub fn name(this: &IdbObjectStore) -> ::alloc::string::String;
26 #[wasm_bindgen(method, setter, js_class = "IDBObjectStore", js_name = "name")]
27 #[doc = "Setter for the `name` field of this object."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/name)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
32 pub fn set_name(this: &IdbObjectStore, value: &str);
33 #[wasm_bindgen(
34 catch,
35 method,
36 getter,
37 js_class = "IDBObjectStore",
38 js_name = "keyPath"
39 )]
40 #[doc = "Getter for the `keyPath` field of this object."]
41 #[doc = ""]
42 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/keyPath)"]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
45 pub fn key_path(this: &IdbObjectStore) -> Result<::wasm_bindgen::JsValue, JsValue>;
46 #[cfg(feature = "DomStringList")]
47 #[wasm_bindgen(method, getter, js_class = "IDBObjectStore", js_name = "indexNames")]
48 #[doc = "Getter for the `indexNames` field of this object."]
49 #[doc = ""]
50 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/indexNames)"]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `DomStringList`, `IdbObjectStore`*"]
53 pub fn index_names(this: &IdbObjectStore) -> DomStringList;
54 #[cfg(feature = "IdbTransaction")]
55 #[wasm_bindgen(method, getter, js_class = "IDBObjectStore", js_name = "transaction")]
56 #[doc = "Getter for the `transaction` field of this object."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/transaction)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbTransaction`*"]
61 pub fn transaction(this: &IdbObjectStore) -> IdbTransaction;
62 #[wasm_bindgen(method, getter, js_class = "IDBObjectStore", js_name = "autoIncrement")]
63 #[doc = "Getter for the `autoIncrement` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/autoIncrement)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
68 pub fn auto_increment(this: &IdbObjectStore) -> bool;
69 #[cfg(feature = "IdbRequest")]
70 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore")]
71 #[doc = "The `add()` method."]
72 #[doc = ""]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/add)"]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
76 pub fn add(
77 this: &IdbObjectStore,
78 value: &::wasm_bindgen::JsValue,
79 ) -> Result<IdbRequest, JsValue>;
80 #[cfg(feature = "IdbRequest")]
81 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "add")]
82 #[doc = "The `add()` method."]
83 #[doc = ""]
84 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/add)"]
85 #[doc = ""]
86 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
87 pub fn add_with_key(
88 this: &IdbObjectStore,
89 value: &::wasm_bindgen::JsValue,
90 key: &::wasm_bindgen::JsValue,
91 ) -> Result<IdbRequest, JsValue>;
92 #[cfg(feature = "IdbRequest")]
93 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore")]
94 #[doc = "The `clear()` method."]
95 #[doc = ""]
96 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/clear)"]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
99 pub fn clear(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
100 #[cfg(feature = "IdbRequest")]
101 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore")]
102 #[doc = "The `count()` method."]
103 #[doc = ""]
104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/count)"]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
107 pub fn count(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
108 #[cfg(feature = "IdbRequest")]
109 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "count")]
110 #[doc = "The `count()` method."]
111 #[doc = ""]
112 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/count)"]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
115 pub fn count_with_key(
116 this: &IdbObjectStore,
117 query: &::wasm_bindgen::JsValue,
118 ) -> Result<IdbRequest, JsValue>;
119 #[cfg(feature = "IdbIndex")]
120 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "createIndex")]
121 #[doc = "The `createIndex()` method."]
122 #[doc = ""]
123 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex)"]
124 #[doc = ""]
125 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbObjectStore`*"]
126 pub fn create_index_with_str(
127 this: &IdbObjectStore,
128 name: &str,
129 key_path: &str,
130 ) -> Result<IdbIndex, JsValue>;
131 #[cfg(feature = "IdbIndex")]
132 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "createIndex")]
133 #[doc = "The `createIndex()` method."]
134 #[doc = ""]
135 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex)"]
136 #[doc = ""]
137 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbObjectStore`*"]
138 pub fn create_index_with_str_sequence(
139 this: &IdbObjectStore,
140 name: &str,
141 key_path: &::wasm_bindgen::JsValue,
142 ) -> Result<IdbIndex, JsValue>;
143 #[cfg(all(feature = "IdbIndex", feature = "IdbIndexParameters",))]
144 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "createIndex")]
145 #[doc = "The `createIndex()` method."]
146 #[doc = ""]
147 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex)"]
148 #[doc = ""]
149 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbIndexParameters`, `IdbObjectStore`*"]
150 pub fn create_index_with_str_and_optional_parameters(
151 this: &IdbObjectStore,
152 name: &str,
153 key_path: &str,
154 options: &IdbIndexParameters,
155 ) -> Result<IdbIndex, JsValue>;
156 #[cfg(all(feature = "IdbIndex", feature = "IdbIndexParameters",))]
157 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "createIndex")]
158 #[doc = "The `createIndex()` method."]
159 #[doc = ""]
160 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex)"]
161 #[doc = ""]
162 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbIndexParameters`, `IdbObjectStore`*"]
163 pub fn create_index_with_str_sequence_and_optional_parameters(
164 this: &IdbObjectStore,
165 name: &str,
166 key_path: &::wasm_bindgen::JsValue,
167 options: &IdbIndexParameters,
168 ) -> Result<IdbIndex, JsValue>;
169 #[cfg(feature = "IdbRequest")]
170 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore")]
171 #[doc = "The `delete()` method."]
172 #[doc = ""]
173 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/delete)"]
174 #[doc = ""]
175 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
176 pub fn delete(
177 this: &IdbObjectStore,
178 query: &::wasm_bindgen::JsValue,
179 ) -> Result<IdbRequest, JsValue>;
180 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "deleteIndex")]
181 #[doc = "The `deleteIndex()` method."]
182 #[doc = ""]
183 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/deleteIndex)"]
184 #[doc = ""]
185 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
186 pub fn delete_index(this: &IdbObjectStore, name: &str) -> Result<(), JsValue>;
187 #[cfg(feature = "IdbRequest")]
188 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore")]
189 #[doc = "The `get()` method."]
190 #[doc = ""]
191 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/get)"]
192 #[doc = ""]
193 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
194 pub fn get(
195 this: &IdbObjectStore,
196 query: &::wasm_bindgen::JsValue,
197 ) -> Result<IdbRequest, JsValue>;
198 #[cfg(feature = "IdbRequest")]
199 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "getAll")]
200 #[doc = "The `getAll()` method."]
201 #[doc = ""]
202 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAll)"]
203 #[doc = ""]
204 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
205 pub fn get_all(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
206 #[cfg(feature = "IdbRequest")]
207 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "getAll")]
208 #[doc = "The `getAll()` method."]
209 #[doc = ""]
210 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAll)"]
211 #[doc = ""]
212 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
213 pub fn get_all_with_key(
214 this: &IdbObjectStore,
215 query: &::wasm_bindgen::JsValue,
216 ) -> Result<IdbRequest, JsValue>;
217 #[cfg(feature = "IdbRequest")]
218 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "getAll")]
219 #[doc = "The `getAll()` method."]
220 #[doc = ""]
221 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAll)"]
222 #[doc = ""]
223 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
224 pub fn get_all_with_key_and_limit(
225 this: &IdbObjectStore,
226 query: &::wasm_bindgen::JsValue,
227 count: u32,
228 ) -> Result<IdbRequest, JsValue>;
229 #[cfg(feature = "IdbRequest")]
230 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "getAllKeys")]
231 #[doc = "The `getAllKeys()` method."]
232 #[doc = ""]
233 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAllKeys)"]
234 #[doc = ""]
235 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
236 pub fn get_all_keys(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
237 #[cfg(feature = "IdbRequest")]
238 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "getAllKeys")]
239 #[doc = "The `getAllKeys()` method."]
240 #[doc = ""]
241 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAllKeys)"]
242 #[doc = ""]
243 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
244 pub fn get_all_keys_with_key(
245 this: &IdbObjectStore,
246 query: &::wasm_bindgen::JsValue,
247 ) -> Result<IdbRequest, JsValue>;
248 #[cfg(feature = "IdbRequest")]
249 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "getAllKeys")]
250 #[doc = "The `getAllKeys()` method."]
251 #[doc = ""]
252 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAllKeys)"]
253 #[doc = ""]
254 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
255 pub fn get_all_keys_with_key_and_limit(
256 this: &IdbObjectStore,
257 query: &::wasm_bindgen::JsValue,
258 count: u32,
259 ) -> Result<IdbRequest, JsValue>;
260 #[cfg(feature = "IdbRequest")]
261 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "getKey")]
262 #[doc = "The `getKey()` method."]
263 #[doc = ""]
264 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getKey)"]
265 #[doc = ""]
266 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
267 pub fn get_key(
268 this: &IdbObjectStore,
269 query: &::wasm_bindgen::JsValue,
270 ) -> Result<IdbRequest, JsValue>;
271 #[cfg(feature = "IdbIndex")]
272 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore")]
273 #[doc = "The `index()` method."]
274 #[doc = ""]
275 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/index)"]
276 #[doc = ""]
277 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbObjectStore`*"]
278 pub fn index(this: &IdbObjectStore, name: &str) -> Result<IdbIndex, JsValue>;
279 #[cfg(feature = "IdbRequest")]
280 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "openCursor")]
281 #[doc = "The `openCursor()` method."]
282 #[doc = ""]
283 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openCursor)"]
284 #[doc = ""]
285 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
286 pub fn open_cursor(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
287 #[cfg(feature = "IdbRequest")]
288 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "openCursor")]
289 #[doc = "The `openCursor()` method."]
290 #[doc = ""]
291 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openCursor)"]
292 #[doc = ""]
293 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
294 pub fn open_cursor_with_range(
295 this: &IdbObjectStore,
296 query: &::wasm_bindgen::JsValue,
297 ) -> Result<IdbRequest, JsValue>;
298 #[cfg(all(feature = "IdbCursorDirection", feature = "IdbRequest",))]
299 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "openCursor")]
300 #[doc = "The `openCursor()` method."]
301 #[doc = ""]
302 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openCursor)"]
303 #[doc = ""]
304 #[doc = "*This API requires the following crate features to be activated: `IdbCursorDirection`, `IdbObjectStore`, `IdbRequest`*"]
305 pub fn open_cursor_with_range_and_direction(
306 this: &IdbObjectStore,
307 query: &::wasm_bindgen::JsValue,
308 direction: IdbCursorDirection,
309 ) -> Result<IdbRequest, JsValue>;
310 #[cfg(feature = "IdbRequest")]
311 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "openKeyCursor")]
312 #[doc = "The `openKeyCursor()` method."]
313 #[doc = ""]
314 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openKeyCursor)"]
315 #[doc = ""]
316 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
317 pub fn open_key_cursor(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
318 #[cfg(feature = "IdbRequest")]
319 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "openKeyCursor")]
320 #[doc = "The `openKeyCursor()` method."]
321 #[doc = ""]
322 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openKeyCursor)"]
323 #[doc = ""]
324 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
325 pub fn open_key_cursor_with_range(
326 this: &IdbObjectStore,
327 query: &::wasm_bindgen::JsValue,
328 ) -> Result<IdbRequest, JsValue>;
329 #[cfg(all(feature = "IdbCursorDirection", feature = "IdbRequest",))]
330 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "openKeyCursor")]
331 #[doc = "The `openKeyCursor()` method."]
332 #[doc = ""]
333 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openKeyCursor)"]
334 #[doc = ""]
335 #[doc = "*This API requires the following crate features to be activated: `IdbCursorDirection`, `IdbObjectStore`, `IdbRequest`*"]
336 pub fn open_key_cursor_with_range_and_direction(
337 this: &IdbObjectStore,
338 query: &::wasm_bindgen::JsValue,
339 direction: IdbCursorDirection,
340 ) -> Result<IdbRequest, JsValue>;
341 #[cfg(feature = "IdbRequest")]
342 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore")]
343 #[doc = "The `put()` method."]
344 #[doc = ""]
345 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/put)"]
346 #[doc = ""]
347 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
348 pub fn put(
349 this: &IdbObjectStore,
350 value: &::wasm_bindgen::JsValue,
351 ) -> Result<IdbRequest, JsValue>;
352 #[cfg(feature = "IdbRequest")]
353 #[wasm_bindgen(catch, method, js_class = "IDBObjectStore", js_name = "put")]
354 #[doc = "The `put()` method."]
355 #[doc = ""]
356 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/put)"]
357 #[doc = ""]
358 #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
359 pub fn put_with_key(
360 this: &IdbObjectStore,
361 value: &::wasm_bindgen::JsValue,
362 key: &::wasm_bindgen::JsValue,
363 ) -> Result<IdbRequest, JsValue>;
364}