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