1/* 2 * Copyright (c) 2023-2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkData 19 */ 20 21import { AsyncCallback, Callback } from './@ohos.base'; 22import Context from './application/BaseContext'; 23import dataSharePredicates from './@ohos.data.dataSharePredicates'; 24/*** if arkts 1.1 */ 25import sendableRelationalStore from './@ohos.data.sendableRelationalStore'; 26/*** endif */ 27/** 28 * Provides methods for rdbStore create and delete. 29 * 30 * @namespace relationalStore 31 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 32 * @since 9 33 */ 34/** 35 * Provides methods for rdbStore create and delete. 36 * 37 * @namespace relationalStore 38 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 39 * @crossplatform 40 * @since arkts {'1.1':'10', '1.2':'20'} 41 * @arkts 1.1&1.2 42 */ 43declare namespace relationalStore { 44 /** 45 * Describes the status of asset 46 * 47 * @enum { number } 48 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 49 * @crossplatform 50 * @since arkts {'1.1':'10', '1.2':'20'} 51 * @arkts 1.1&1.2 52 */ 53 enum AssetStatus { 54 /** 55 * ASSET_NORMAL: means the status of asset is normal. 56 * 57 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 58 * @crossplatform 59 * @since arkts {'1.1':'10', '1.2':'20'} 60 * @arkts 1.1&1.2 61 */ 62 ASSET_NORMAL, 63 64 /** 65 * ASSET_ABNORMAL: means the asset needs to be inserted. 66 * 67 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 68 * @crossplatform 69 * @since arkts {'1.1':'10', '1.2':'20'} 70 * @arkts 1.1&1.2 71 */ 72 ASSET_INSERT, 73 74 /** 75 * ASSET_ABNORMAL: means the asset needs to be updated. 76 * 77 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 78 * @crossplatform 79 * @since arkts {'1.1':'10', '1.2':'20'} 80 * @arkts 1.1&1.2 81 */ 82 ASSET_UPDATE, 83 84 /** 85 * ASSET_ABNORMAL: means the asset needs to be deleted. 86 * 87 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 88 * @crossplatform 89 * @since arkts {'1.1':'10', '1.2':'20'} 90 * @arkts 1.1&1.2 91 */ 92 ASSET_DELETE, 93 94 /** 95 * ASSET_ABNORMAL: means the status of asset is abnormal. 96 * 97 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 98 * @crossplatform 99 * @since arkts {'1.1':'10', '1.2':'20'} 100 * @arkts 1.1&1.2 101 */ 102 ASSET_ABNORMAL, 103 104 /** 105 * ASSET_DOWNLOADING: means the status of asset is downloading. 106 * 107 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 108 * @crossplatform 109 * @since arkts {'1.1':'10', '1.2':'20'} 110 * @arkts 1.1&1.2 111 */ 112 ASSET_DOWNLOADING 113 } 114 115 /** 116 * Records information of the asset. 117 * 118 * @interface Asset 119 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 120 * @crossplatform 121 * @since arkts {'1.1':'10', '1.2':'20'} 122 * @arkts 1.1&1.2 123 */ 124 interface Asset { 125 /** 126 * The name of asset. 127 * 128 * @type { string } 129 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 130 * @crossplatform 131 * @since arkts {'1.1':'10', '1.2':'20'} 132 * @arkts 1.1&1.2 133 */ 134 name: string; 135 136 /** 137 * The uri of asset. 138 * 139 * @type { string } 140 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 141 * @crossplatform 142 * @since arkts {'1.1':'10', '1.2':'20'} 143 * @arkts 1.1&1.2 144 */ 145 uri: string; 146 147 /** 148 * The path of asset. 149 * 150 * @type { string } 151 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 152 * @crossplatform 153 * @since arkts {'1.1':'10', '1.2':'20'} 154 * @arkts 1.1&1.2 155 */ 156 path: string; 157 158 /** 159 * The create time of asset. 160 * 161 * @type { string } 162 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 163 * @crossplatform 164 * @since arkts {'1.1':'10', '1.2':'20'} 165 * @arkts 1.1&1.2 166 */ 167 createTime: string; 168 169 /** 170 * The modify time of asset. 171 * 172 * @type { string } 173 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 174 * @crossplatform 175 * @since arkts {'1.1':'10', '1.2':'20'} 176 * @arkts 1.1&1.2 177 */ 178 modifyTime: string; 179 180 /** 181 * The size of asset. 182 * 183 * @type { string } 184 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 185 * @crossplatform 186 * @since arkts {'1.1':'10', '1.2':'20'} 187 * @arkts 1.1&1.2 188 */ 189 size: string; 190 191 /** 192 * The status of asset. 193 * 194 * @type { ?AssetStatus } 195 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 196 * @crossplatform 197 * @since arkts {'1.1':'10', '1.2':'20'} 198 * @arkts 1.1&1.2 199 */ 200 status?: AssetStatus; 201 } 202 203 /** 204 * Indicates several assets in one column 205 * 206 * @typedef { Asset[] } Assets 207 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 208 * @crossplatform 209 * @since arkts {'1.1':'10', '1.2':'20'} 210 * @arkts 1.1&1.2 211 */ 212 type Assets = Asset[]; 213 214 /** 215 * Indicates possible value types 216 * 217 * @typedef { null | number | string | boolean | Uint8Array } ValueType 218 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 219 * @since 9 220 */ 221 /** 222 * Indicates possible value types 223 * 224 * @typedef { null | number | string | boolean | Uint8Array | Asset | Assets } ValueType 225 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 226 * @crossplatform 227 * @since 10 228 */ 229 /** 230 * Indicates possible value types 231 * 232 * @typedef { null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint } ValueType 233 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 234 * @crossplatform 235 * @since arkts {'1.1':'12', '1.2':'20'} 236 * @arkts 1.1&1.2 237 */ 238 type ValueType = null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint; 239 240 /** 241 * Values in buckets are stored in key-value pairs 242 * 243 * @typedef { Record<string, ValueType> } ValuesBucket 244 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 245 * @since 9 246 */ 247 /** 248 * Values in buckets are stored in key-value pairs, move Uint8Array add to ValueType 249 * 250 * @typedef { Record<string, ValueType> } ValuesBucket 251 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 252 * @crossplatform 253 * @since 10 254 */ 255 /** 256 * Values in buckets are stored in key-value pairs, change {[key: string]: ValueType;} to Record<string, ValueType> 257 * 258 * @typedef { Record<string, ValueType> } ValuesBucket 259 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 260 * @crossplatform 261 * @since arkts {'1.1':'11', '1.2':'20'} 262 * @arkts 1.1&1.2 263 */ 264 type ValuesBucket = Record<string, ValueType>; 265 266 /** 267 * The type of the priority key can be number or string 268 * 269 * @typedef { number | string } PRIKeyType 270 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 271 * @since 10 272 */ 273 type PRIKeyType = number | string; 274 275 /** 276 * The time is in UTC format. 277 * 278 * @typedef { Date } UTCTime 279 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 280 * @since 10 281 */ 282 type UTCTime = Date; 283 284 /** 285 * Indicates the primary key and UTC time of the modified rows. 286 * 287 * @typedef { Map<PRIKeyType, UTCTime> } ModifyTime 288 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 289 * @since 10 290 */ 291 type ModifyTime = Map<PRIKeyType, UTCTime>; 292 293 /** 294 * Manages relational database configurations. 295 * 296 * @interface StoreConfig 297 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 298 * @since 9 299 */ 300 /** 301 * Manages relational database configurations. 302 * 303 * @interface StoreConfig 304 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 305 * @crossplatform 306 * @since arkts {'1.1':'10', '1.2':'20'} 307 * @arkts 1.1&1.2 308 */ 309 interface StoreConfig { 310 /** 311 * The database name. 312 * 313 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 314 * @since 9 315 */ 316 /** 317 * The database name. 318 * 319 * @type { string } 320 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 321 * @crossplatform 322 * @since arkts {'1.1':'10', '1.2':'20'} 323 * @arkts 1.1&1.2 324 */ 325 name: string; 326 327 /** 328 * Specifies the security level of the database. 329 * 330 * @type { SecurityLevel } 331 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 332 * @crossplatform 333 * @since arkts {'1.1':'9', '1.2':'20'} 334 * @arkts 1.1&1.2 335 */ 336 securityLevel: SecurityLevel; 337 338 /** 339 * Specifies whether the database is encrypted. 340 * 341 * @type { ?boolean } 342 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 343 * @since arkts {'1.1':'9', '1.2':'20'} 344 * @arkts 1.1&1.2 345 */ 346 encrypt?: boolean; 347 348 /** 349 * The data group id of application. 350 * 351 * @type { ?string } 352 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 353 * @StageModelOnly 354 * @since arkts {'1.1':'10', '1.2':'20'} 355 * @arkts 1.1&1.2 356 */ 357 dataGroupId?: string; 358 359 /** 360 * Specifies the directory relative to the database directory obtained from context 361 * 362 * @type { ?string } 363 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 364 * @crossplatform 365 * @since arkts {'1.1':'11', '1.2':'20'} 366 * @arkts 1.1&1.2 367 */ 368 customDir?: string; 369 370 /** 371 * Specifies the root directory relative to the database 372 * 373 * @type { ?string } 374 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 375 * @crossplatform 376 * @since 18 377 */ 378 rootDir?: string; 379 380 /** 381 * Specifies whether to clean up dirty data that is synchronized to 382 * the local but deleted in the cloud. 383 * 384 * @type { ?boolean } 385 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 386 * @since arkts {'1.1':'11', '1.2':'20'} 387 * @arkts 1.1&1.2 388 */ 389 autoCleanDirtyData?: boolean; 390 391 /** 392 * Specifies whether data can be searched. 393 * 394 * @type { ?boolean } 395 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 396 * @systemapi 397 * @since arkts {'1.1':'11', '1.2':'20'} 398 * @arkts 1.1&1.2 399 */ 400 isSearchable?: boolean; 401 402 /** 403 * Specifies whether database allows rebuild. 404 * 405 * @type { ?boolean } 406 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 407 * @since arkts {'1.1':'12', '1.2':'20'} 408 * @arkts 1.1&1.2 409 */ 410 allowRebuild?: boolean; 411 412 /** 413 * Specifies whether the vector type is supported. 414 * 415 * @type { ?boolean } 416 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 417 * @since arkts {'1.1':'18', '1.2':'20'} 418 * @arkts 1.1&1.2 419 */ 420 vector?: boolean; 421 422 /** 423 * Specifies whether the database opened is read-only. 424 * If isReadOnly is true, other configuration items will become invalid. 425 * 426 * @type { ?boolean } 427 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 428 * @since 12 429 */ 430 /** 431 * Specifies whether the database opened is read-only. 432 * If isReadOnly is true, other configuration items will become invalid. 433 * 434 * @type { ?boolean } 435 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 436 * @crossplatform 437 * @since 20 438 * @arkts 1.1&1.2 439 */ 440 isReadOnly?: boolean; 441 442 /** 443 * Indicates the names of the shared library containing fts etc. 444 * 445 * @type { ?Array<string> } 446 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 447 * @since arkts {'1.1':'12', '1.2':'20'} 448 * @arkts 1.1&1.2 449 */ 450 pluginLibs?: Array<string>; 451 452 /** 453 * Enumerates the high availability modes of the RDB store. 454 * 455 * @type { ?HAMode } 456 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 457 * @systemapi 458 * @since arkts {'1.1':'12', '1.2':'20'} 459 * @arkts 1.1&1.2 460 */ 461 haMode?: HAMode; 462 463 /** 464 * Specifies the cryptographic parameters used when opening an encrypted database. 465 * 466 * @type { ?CryptoParam } 467 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 468 * @since 14 469 */ 470 /** 471 * Specifies the cryptographic parameters used when opening an encrypted database. 472 * 473 * @type { ?CryptoParam } 474 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 475 * @crossplatform 476 * @since 20 477 * @arkts 1.1&1.2 478 */ 479 cryptoParam?: CryptoParam; 480 481 /** 482 * Specifies the tokenizer type when using fts capability. 483 * 484 * @type { ?Tokenizer } 485 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 486 * @since 17 487 */ 488 489 tokenizer?: Tokenizer; 490 491 /** 492 * Specifies whether the database need persistence. 493 * 494 * @type { ?boolean } 495 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 496 * @since 18 497 */ 498 /** 499 * Specifies whether the database need persistence. 500 * 501 * @type { ?boolean } 502 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 503 * @crossplatform 504 * @since 20 505 */ 506 507 persist?: boolean; 508 509 /** 510 * Specifies whether the database enable the capabilities for semantic indexing processing. 511 * 512 * @type { ?boolean } 513 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 514 * @since 20 515 */ 516 517 enableSemanticIndex?: boolean; 518 } 519 520 /** 521 * Enumerates the high availability modes of the RDB store. 522 * 523 * @enum { number } 524 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 525 * @systemapi 526 * @since arkts {'1.1':'12', '1.2':'20'} 527 * @arkts 1.1&1.2 528 */ 529 enum HAMode { 530 /** 531 * SINGLE: Data is written to a single RDB store. 532 * 533 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 534 * @systemapi 535 * @since arkts {'1.1':'12', '1.2':'20'} 536 * @arkts 1.1&1.2 537 */ 538 SINGLE = 0, 539 540 /** 541 * MAIN_REPLICA: Data is written to the main and replica RDB stores. 542 * 543 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 544 * @systemapi 545 * @since arkts {'1.1':'12', '1.2':'20'} 546 * @arkts 1.1&1.2 547 */ 548 MAIN_REPLICA 549 } 550 551 /** 552 * Specifies the cryptographic parameters used when opening an encrypted database. 553 * 554 * @typedef CryptoParam 555 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 556 * @since 14 557 */ 558 /** 559 * Specifies the cryptographic parameters used when opening an encrypted database. 560 * 561 * @typedef CryptoParam 562 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 563 * @crossplatform 564 * @since 20 565 * @arkts 1.1&1.2 566 */ 567 interface CryptoParam { 568 /** 569 * Specifies the key used when opening an encrypted database. 570 * When finished passing the key to the database, its content should be set to all-zero. 571 * 572 * @type { Uint8Array } 573 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 574 * @since 14 575 */ 576 /** 577 * Specifies the key used when opening an encrypted database. 578 * When finished passing the key to the database, its content should be set to all-zero. 579 * 580 * @type { Uint8Array } 581 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 582 * @crossplatform 583 * @since 20 584 * @arkts 1.1&1.2 585 */ 586 encryptionKey: Uint8Array; 587 588 /** 589 * Specifies the number of KDF iterations used when opening an encrypted database. 590 * Default number is 10000. 591 * When the number is set to 0, use default iteration number and encryption algorithm. 592 * 593 * @type { ?number } 594 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 595 * @since 14 596 */ 597 /** 598 * Specifies the number of KDF iterations used when opening an encrypted database. 599 * Default number is 10000. 600 * When the number is set to 0, use default iteration number and encryption algorithm. 601 * 602 * @type { ?number } 603 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 604 * @crossplatform 605 * @since 20 606 * @arkts 1.1&1.2 607 */ 608 iterationCount?: number; 609 610 /** 611 * Specifies the encryption algorithm when opening an encrypted database. 612 * Default encryption algorithm is AES_256_GCM. 613 * 614 * @type { ?EncryptionAlgo } 615 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 616 * @since 14 617 */ 618 /** 619 * Specifies the encryption algorithm when opening an encrypted database. 620 * Default encryption algorithm is AES_256_GCM. 621 * 622 * @type { ?EncryptionAlgo } 623 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 624 * @crossplatform 625 * @since 20 626 * @arkts 1.1&1.2 627 */ 628 encryptionAlgo?: EncryptionAlgo; 629 630 /** 631 * Specifies the HMAC algorithm when opening an encrypted database. 632 * Default HMAC algorithm is SHA256. 633 * 634 * @type { ?HmacAlgo } 635 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 636 * @since 14 637 */ 638 /** 639 * Specifies the HMAC algorithm when opening an encrypted database. 640 * Default HMAC algorithm is SHA256. 641 * 642 * @type { ?HmacAlgo } 643 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 644 * @crossplatform 645 * @since 20 646 * @arkts 1.1&1.2 647 */ 648 hmacAlgo?: HmacAlgo; 649 650 /** 651 * Specifies the KDF algorithm when opening an encrypted database. 652 * Default KDF SHA algorithm is the same as HMAC algorithm. 653 * 654 * @type { ?KdfAlgo } 655 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 656 * @since 14 657 */ 658 /** 659 * Specifies the KDF algorithm when opening an encrypted database. 660 * Default KDF SHA algorithm is the same as HMAC algorithm. 661 * 662 * @type { ?KdfAlgo } 663 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 664 * @crossplatform 665 * @since 20 666 * @arkts 1.1&1.2 667 */ 668 kdfAlgo?: KdfAlgo; 669 670 /** 671 * Specifies the page size used when opening an encrypted database. 672 * Default crypto page size is 1024. 673 * 674 * @type { ?number } 675 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 676 * @since 14 677 */ 678 /** 679 * Specifies the page size used when opening an encrypted database. 680 * Default crypto page size is 1024. 681 * 682 * @type { ?number } 683 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 684 * @crossplatform 685 * @since 20 686 * @arkts 1.1&1.2 687 */ 688 cryptoPageSize?: number; 689 } 690 691 /** 692 * Enumerates the supported encryption algorithm when opening a database. 693 * 694 * @enum { number } 695 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 696 * @since 14 697 */ 698 /** 699 * Enumerates the supported encryption algorithm when opening a database. 700 * 701 * @enum { number } 702 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 703 * @crossplatform 704 * @since 20 705 * @arkts 1.1&1.2 706 */ 707 enum EncryptionAlgo { 708 /** 709 * AES_256_GCM: Database is encrypted using AES_256_GCM. 710 * 711 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 712 * @since 14 713 */ 714 /** 715 * AES_256_GCM: Database is encrypted using AES_256_GCM. 716 * 717 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 718 * @crossplatform 719 * @since 20 720 * @arkts 1.1&1.2 721 */ 722 AES_256_GCM = 0, 723 724 /** 725 * AES_256_CBC: Database is encrypted using AES_256_CBC. 726 * 727 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 728 * @since 14 729 */ 730 /** 731 * AES_256_CBC: Database is encrypted using AES_256_CBC. 732 * 733 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 734 * @crossplatform 735 * @since 20 736 * @arkts 1.1&1.2 737 */ 738 AES_256_CBC 739 } 740 741 /** 742 * Enumerates the supported HMAC algorithm when opening a database. 743 * 744 * @enum { number } 745 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 746 * @since 14 747 */ 748 /** 749 * Enumerates the supported HMAC algorithm when opening a database. 750 * 751 * @enum { number } 752 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 753 * @crossplatform 754 * @since 20 755 * @arkts 1.1&1.2 756 */ 757 enum HmacAlgo { 758 /** 759 * SHA1: HMAC_SHA1 algorithm. 760 * 761 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 762 * @since 14 763 */ 764 /** 765 * SHA1: HMAC_SHA1 algorithm. 766 * 767 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 768 * @crossplatform 769 * @since 20 770 * @arkts 1.1&1.2 771 */ 772 SHA1 = 0, 773 774 /** 775 * SHA256: HMAC_SHA256 algorithm. 776 * 777 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 778 * @since 14 779 */ 780 /** 781 * SHA256: HMAC_SHA256 algorithm. 782 * 783 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 784 * @crossplatform 785 * @since 20 786 * @arkts 1.1&1.2 787 */ 788 SHA256, 789 790 /** 791 * SHA512: HMAC_SHA512 algorithm. 792 * 793 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 794 * @since 14 795 */ 796 /** 797 * SHA512: HMAC_SHA512 algorithm. 798 * 799 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 800 * @crossplatform 801 * @since 20 802 * @arkts 1.1&1.2 803 */ 804 SHA512 805 } 806 807 /** 808 * Enumerates the supported KDF algorithm when opening a database. 809 * 810 * @enum { number } 811 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 812 * @since 14 813 */ 814 /** 815 * Enumerates the supported KDF algorithm when opening a database. 816 * 817 * @enum { number } 818 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 819 * @crossplatform 820 * @since 20 821 * @arkts 1.1&1.2 822 */ 823 enum KdfAlgo { 824 /** 825 * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. 826 * 827 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 828 * @since 14 829 */ 830 /** 831 * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. 832 * 833 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 834 * @crossplatform 835 * @since 20 836 * @arkts 1.1&1.2 837 */ 838 KDF_SHA1 = 0, 839 840 /** 841 * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. 842 * 843 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 844 * @since 14 845 */ 846 /** 847 * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. 848 * 849 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 850 * @crossplatform 851 * @since 20 852 * @arkts 1.1&1.2 853 */ 854 KDF_SHA256, 855 856 /** 857 * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. 858 * 859 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 860 * @since 14 861 */ 862 /** 863 * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. 864 * 865 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 866 * @crossplatform 867 * @since 20 868 * @arkts 1.1&1.2 869 */ 870 KDF_SHA512 871 } 872 873 /** 874 * Enumerates the supported tokenizer when opening a database. 875 * 876 * @enum { number } 877 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 878 * @since 17 879 */ 880 enum Tokenizer { 881 /** 882 * NONE_TOKENIZER: not use tokenizer 883 * 884 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 885 * @since 17 886 */ 887 NONE_TOKENIZER = 0, 888 /** 889 * ICU_TOKENIZER: native icu tokenizer. 890 * 891 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 892 * @since 17 893 */ 894 ICU_TOKENIZER, 895 /** 896 * CUSTOM_TOKENIZER: self-developed enhance tokenizer. 897 * 898 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 899 * @since 18 900 */ 901 CUSTOM_TOKENIZER 902 } 903 904 /** 905 * The cloud sync progress 906 * 907 * @enum { number } 908 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 909 * @since 10 910 */ 911 enum Progress { 912 /** 913 * SYNC_BEGIN: means the sync process begin. 914 * 915 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 916 * @since 10 917 */ 918 SYNC_BEGIN, 919 920 /** 921 * SYNC_BEGIN: means the sync process is in progress 922 * 923 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 924 * @since 10 925 */ 926 SYNC_IN_PROGRESS, 927 928 /** 929 * SYNC_BEGIN: means the sync process is finished 930 * 931 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 932 * @since 10 933 */ 934 SYNC_FINISH 935 } 936 937 /** 938 * Describes the statistic of the cloud sync process. 939 * 940 * @interface Statistic 941 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 942 * @since 10 943 */ 944 interface Statistic { 945 /** 946 * Describes the total number of data to sync. 947 * 948 * @type { number } 949 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 950 * @since 10 951 */ 952 total: number; 953 954 /** 955 * Describes the number of successfully synced data. 956 * 957 * @type { number } 958 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 959 * @since 10 960 */ 961 successful: number; 962 963 /** 964 * Describes the number of data failed to sync. 965 * 966 * @type { number } 967 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 968 * @since 10 969 */ 970 failed: number; 971 972 /** 973 * Describes the number of data remained to sync. 974 * 975 * @type { number } 976 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 977 * @since 10 978 */ 979 remained: number; 980 } 981 982 /** 983 * Describes the {@code Statistic} details of the table. 984 * 985 * @interface TableDetails 986 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 987 * @since 10 988 */ 989 interface TableDetails { 990 /** 991 * Describes the {@code Statistic} details of the upload process. 992 * 993 * @type { Statistic } 994 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 995 * @since 10 996 */ 997 upload: Statistic; 998 999 /** 1000 * Describes the {@code Statistic} details of the download process. 1001 * 1002 * @type { Statistic } 1003 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1004 * @since 10 1005 */ 1006 download: Statistic; 1007 } 1008 1009 /** 1010 * Describes the status of {@code Progress}. 1011 * 1012 * @enum { number } 1013 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1014 * @since 10 1015 */ 1016 enum ProgressCode { 1017 /** 1018 * SUCCESS: means the status of progress is success. 1019 * 1020 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1021 * @since 10 1022 */ 1023 SUCCESS, 1024 1025 /** 1026 * UNKNOWN_ERROR: means the progress meets unknown error. 1027 * 1028 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1029 * @since 10 1030 */ 1031 UNKNOWN_ERROR, 1032 1033 /** 1034 * NETWORK_ERROR: means the progress meets network error. 1035 * 1036 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1037 * @since 10 1038 */ 1039 NETWORK_ERROR, 1040 1041 /** 1042 * CLOUD_DISABLED: means cloud is disabled. 1043 * 1044 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1045 * @since 10 1046 */ 1047 CLOUD_DISABLED, 1048 1049 /** 1050 * LOCKED_BY_OTHERS: means the progress is locked by others. 1051 * 1052 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1053 * @since 10 1054 */ 1055 LOCKED_BY_OTHERS, 1056 1057 /** 1058 * RECORD_LIMIT_EXCEEDED: means the record exceeds the limit. 1059 * 1060 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1061 * @since 10 1062 */ 1063 RECORD_LIMIT_EXCEEDED, 1064 1065 /** 1066 * NO_SPACE_FOR_ASSET: means the cloud has no space for the asset. 1067 * 1068 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1069 * @since 10 1070 */ 1071 NO_SPACE_FOR_ASSET, 1072 1073 /** 1074 * BLOCKED_BY_NETWORK_STRATEGY: means the sync blocked by network strategy. 1075 * 1076 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1077 * @since 12 1078 */ 1079 BLOCKED_BY_NETWORK_STRATEGY 1080 } 1081 1082 /** 1083 * Describes detail of the cloud sync {@code Progress}. 1084 * 1085 * @interface ProgressDetails 1086 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1087 * @since 10 1088 */ 1089 interface ProgressDetails { 1090 /** 1091 * Describes the status of data sync progress. 1092 * 1093 * @type { Progress } 1094 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1095 * @since 10 1096 */ 1097 schedule: Progress; 1098 1099 /** 1100 * Describes the code of data sync progress. 1101 * 1102 * @type { ProgressCode } 1103 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1104 * @since 10 1105 */ 1106 code: ProgressCode; 1107 1108 /** 1109 * The statistic details of the tables. 1110 * 1111 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1112 * @since 10 1113 */ 1114 /** 1115 * The statistic details of the tables. 1116 * 1117 * @type { Record<string, TableDetails> } 1118 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1119 * @since 11 1120 */ 1121 details: Record<string, TableDetails>; 1122 } 1123 1124 /** 1125 * Defines information about the SQL statements executed. 1126 * 1127 * @interface SqlExecutionInfo 1128 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1129 * @since 12 1130 */ 1131 /** 1132 * Defines information about the SQL statements executed. 1133 * 1134 * @interface SqlExecutionInfo 1135 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1136 * @crossplatform 1137 * @since 20 1138 */ 1139 interface SqlExecutionInfo { 1140 /** 1141 * Array of SQL statements executed. When the args of batchInsert is too large, there may be more than one SQL. 1142 * 1143 * @type { Array<string> } 1144 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1145 * @since 12 1146 */ 1147 /** 1148 * Array of SQL statements executed. When the args of batchInsert is too large, there may be more than one SQL. 1149 * 1150 * @type { Array<string> } 1151 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1152 * @crossplatform 1153 * @since 20 1154 */ 1155 sql: Array<string>; 1156 1157 /** 1158 * Total time used for executing the SQL statements, in μs. 1159 * 1160 * @type { number } 1161 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1162 * @since 12 1163 */ 1164 /** 1165 * Total time used for executing the SQL statements, in μs. 1166 * 1167 * @type { number } 1168 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1169 * @crossplatform 1170 * @since 20 1171 */ 1172 totalTime: number; 1173 1174 /** 1175 * Maximum time allowed to obtain the SQL file handle, in μs. 1176 * 1177 * @type { number } 1178 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1179 * @since 12 1180 */ 1181 /** 1182 * Maximum time allowed to obtain the SQL file handle, in μs. 1183 * 1184 * @type { number } 1185 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1186 * @crossplatform 1187 * @since 20 1188 */ 1189 waitTime: number; 1190 1191 /** 1192 * Time used to prepare SQL and args, in μs. 1193 * 1194 * @type { number } 1195 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1196 * @since 12 1197 */ 1198 /** 1199 * Time used to prepare SQL and args, in μs. 1200 * 1201 * @type { number } 1202 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1203 * @crossplatform 1204 * @since 20 1205 */ 1206 prepareTime: number; 1207 1208 /** 1209 * Time used to execute the SQL statements, in μs. 1210 * 1211 * @type { number } 1212 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1213 * @since 12 1214 */ 1215 /** 1216 * Time used to execute the SQL statements, in μs. 1217 * 1218 * @type { number } 1219 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1220 * @crossplatform 1221 * @since 20 1222 */ 1223 executeTime: number; 1224 } 1225 1226 /** 1227 * Defines an exception message. 1228 * 1229 * @interface ExceptionMessage 1230 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1231 * @crossplatform 1232 * @since 20 1233 */ 1234 interface ExceptionMessage { 1235 /** 1236 * Error code returned by SQLite, see {@link https://www.sqlite.org/rescode.html}. 1237 * 1238 * @type { number } 1239 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1240 * @crossplatform 1241 * @since 20 1242 */ 1243 code: number; 1244 1245 /** 1246 * Error message. 1247 * 1248 * @type { string } 1249 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1250 * @crossplatform 1251 * @since 20 1252 */ 1253 message: string; 1254 1255 /** 1256 * SQL statement executed when the exception occurs. 1257 * 1258 * @type { string } 1259 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1260 * @crossplatform 1261 * @since 20 1262 */ 1263 sql: string; 1264 } 1265 1266 /** 1267 * Defines a SQL Information. 1268 * 1269 * @interface SqlInfo 1270 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1271 * @crossplatform 1272 * @since 20 1273 */ 1274 interface SqlInfo { 1275 /** 1276 * SQL statement. 1277 * 1278 * @type { string } 1279 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1280 * @crossplatform 1281 * @since 20 1282 */ 1283 sql: string; 1284 1285 /** 1286 * Parameters of the SQL statement. 1287 * 1288 * @type { Array<ValueType> } 1289 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1290 * @crossplatform 1291 * @since 20 1292 */ 1293 args: Array<ValueType>; 1294 } 1295 1296 /** 1297 * Describes the {@code RdbStore} type. 1298 * 1299 * @enum { number } 1300 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1301 * @crossplatform 1302 * @since arkts {'1.1':'9', '1.2':'20'} 1303 * @arkts 1.1&1.2 1304 */ 1305 enum SecurityLevel { 1306 /** 1307 * S1: means the db is low level security 1308 * There are some low impact, when the data is leaked. 1309 * 1310 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1311 * @crossplatform 1312 * @since arkts {'1.1':'9', '1.2':'20'} 1313 * @arkts 1.1&1.2 1314 */ 1315 S1 = 1, 1316 1317 /** 1318 * S2: means the db is middle level security 1319 * There are some major impact, when the data is leaked. 1320 * 1321 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1322 * @crossplatform 1323 * @since arkts {'1.1':'9', '1.2':'20'} 1324 * @arkts 1.1&1.2 1325 */ 1326 S2 = 2, 1327 1328 /** 1329 * S3: means the db is high level security 1330 * There are some severity impact, when the data is leaked. 1331 * 1332 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1333 * @crossplatform 1334 * @since arkts {'1.1':'9', '1.2':'20'} 1335 * @arkts 1.1&1.2 1336 */ 1337 S3 = 3, 1338 1339 /** 1340 * S4: means the db is critical level security 1341 * There are some critical impact, when the data is leaked. 1342 * 1343 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1344 * @crossplatform 1345 * @since arkts {'1.1':'9', '1.2':'20'} 1346 * @arkts 1.1&1.2 1347 */ 1348 S4 = 4 1349 } 1350 1351 /** 1352 * Indicates the database synchronization mode. 1353 * 1354 * @enum { number } 1355 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1356 * @since 9 1357 */ 1358 enum SyncMode { 1359 /** 1360 * Indicates the data is pushed to remote device from local device. 1361 * 1362 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1363 * @since 9 1364 */ 1365 SYNC_MODE_PUSH = 0, 1366 1367 /** 1368 * Indicates the data is pulled from remote device to local device. 1369 * 1370 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1371 * @since 9 1372 */ 1373 SYNC_MODE_PULL = 1, 1374 1375 /** 1376 * Indicates the data is pulled from remote device to local device. 1377 * 1378 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1379 * @since 10 1380 */ 1381 SYNC_MODE_TIME_FIRST, 1382 1383 /** 1384 * Indicates force push the native data to the cloud. 1385 * 1386 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1387 * @since 10 1388 */ 1389 SYNC_MODE_NATIVE_FIRST, 1390 1391 /** 1392 * Indicates the data is pulled from cloud to local device. 1393 * 1394 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1395 * @since 10 1396 */ 1397 SYNC_MODE_CLOUD_FIRST 1398 } 1399 1400 /** 1401 * Describes the subscription type. 1402 * 1403 * @enum { number } 1404 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1405 * @since 9 1406 */ 1407 enum SubscribeType { 1408 /** 1409 * Subscription to remote data changes 1410 * 1411 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1412 * @since 9 1413 */ 1414 SUBSCRIBE_TYPE_REMOTE = 0, 1415 1416 /** 1417 * Subscription to cloud data changes 1418 * 1419 * @permission ohos.permission.DISTRIBUTED_DATASYNC 1420 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1421 * @since 10 1422 */ 1423 /** 1424 * Subscription to cloud data changes 1425 * 1426 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1427 * @since 12 1428 */ 1429 SUBSCRIBE_TYPE_CLOUD, 1430 1431 /** 1432 * Subscription to cloud data changes details 1433 * 1434 * @permission ohos.permission.DISTRIBUTED_DATASYNC 1435 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1436 * @since 10 1437 */ 1438 /** 1439 * Subscription to cloud data changes details 1440 * 1441 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1442 * @since 12 1443 */ 1444 SUBSCRIBE_TYPE_CLOUD_DETAILS, 1445 1446 /** 1447 * Subscription to local data changes details 1448 * 1449 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1450 * @since 12 1451 */ 1452 SUBSCRIBE_TYPE_LOCAL_DETAILS 1453 } 1454 1455 /** 1456 * Describes the change type. 1457 * 1458 * @enum { number } 1459 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1460 * @since 10 1461 */ 1462 enum ChangeType { 1463 /** 1464 * Means the change type is data change. 1465 * 1466 * @permission ohos.permission.DISTRIBUTED_DATASYNC 1467 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1468 * @since 10 1469 */ 1470 /** 1471 * Means the change type is data change. 1472 * 1473 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1474 * @since 12 1475 */ 1476 DATA_CHANGE, 1477 1478 /** 1479 * Means the change type is asset change. 1480 * 1481 * @permission ohos.permission.DISTRIBUTED_DATASYNC 1482 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1483 * @since 10 1484 */ 1485 /** 1486 * Means the change type is asset change. 1487 * 1488 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1489 * @since 12 1490 */ 1491 ASSET_CHANGE 1492 } 1493 1494 /** 1495 * Indicates the notify info 1496 * 1497 * @interface ChangeInfo 1498 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1499 * @since 10 1500 */ 1501 interface ChangeInfo { 1502 /** 1503 * Indicates the changed table 1504 * 1505 * @type { string } 1506 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1507 * @since 10 1508 */ 1509 table: string; 1510 1511 /** 1512 * Indicates the changed type 1513 * 1514 * @type { ChangeType } 1515 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1516 * @since 10 1517 */ 1518 type: ChangeType; 1519 1520 /** 1521 * Indicates if there is a string primary key, the inserted will keep data's primary keys 1522 * otherwise it will keep the data's rowid. 1523 * 1524 * @type { Array<string> | Array<number> } 1525 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1526 * @since 10 1527 */ 1528 inserted: Array<string> | Array<number>; 1529 1530 /** 1531 * Indicates if there is a string primary key, the updated will keep data's primary keys 1532 * otherwise it will keep the data's rowid. 1533 * 1534 * @type { Array<string> | Array<number> } 1535 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1536 * @since 10 1537 */ 1538 updated: Array<string> | Array<number>; 1539 1540 /** 1541 * Indicates if there is a string primary key, the deleted will keep data's primary keys 1542 * otherwise it will keep the data's rowid. 1543 * 1544 * @type { Array<string> | Array<number> } 1545 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1546 * @since 10 1547 */ 1548 deleted: Array<string> | Array<number>; 1549 } 1550 1551 /** 1552 * Describes the distribution type of the tables. 1553 * 1554 * @enum { number } 1555 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1556 * @since 10 1557 */ 1558 enum DistributedType { 1559 /** 1560 * Indicates the table is distributed among the devices 1561 * 1562 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1563 * @since 10 1564 */ 1565 DISTRIBUTED_DEVICE, 1566 1567 /** 1568 * Indicates the table is distributed between the cloud and the devices. 1569 * 1570 * @permission ohos.permission.DISTRIBUTED_DATASYNC 1571 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1572 * @since 10 1573 */ 1574 /** 1575 * Indicates the table is distributed between the cloud and the devices. 1576 * 1577 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1578 * @since 12 1579 */ 1580 DISTRIBUTED_CLOUD 1581 } 1582 1583 /** 1584 * Indicates the reference between tables. 1585 * 1586 * @interface Reference 1587 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1588 * @systemapi 1589 * @since 11 1590 */ 1591 interface Reference { 1592 /** 1593 * Indicates the table that references another table. 1594 * 1595 * @type { string } 1596 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1597 * @systemapi 1598 * @since 11 1599 */ 1600 sourceTable: string; 1601 1602 /** 1603 * Indicates the table to be referenced. 1604 * 1605 * @type { string } 1606 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1607 * @systemapi 1608 * @since 11 1609 */ 1610 targetTable: string; 1611 1612 /** 1613 * Indicates the reference fields. 1614 * 1615 * @type { Record<string, string> } 1616 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1617 * @systemapi 1618 * @since 11 1619 */ 1620 refFields: Record<string, string> 1621 } 1622 1623 /** 1624 * Manages the distributed configuration of the table. 1625 * 1626 * @interface DistributedConfig 1627 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1628 * @since 10 1629 */ 1630 interface DistributedConfig { 1631 /** 1632 * Specifies whether the database auto sync. 1633 * 1634 * @type { boolean } 1635 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1636 * @since 10 1637 */ 1638 autoSync: boolean; 1639 1640 /** 1641 * Specifies the reference relationships between tables. 1642 * 1643 * @type { ?Array<Reference> } 1644 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1645 * @systemapi 1646 * @since 11 1647 */ 1648 references?: Array<Reference>; 1649 1650 /** 1651 * Specifies whether async download assets. 1652 * 1653 * @type { ?boolean } 1654 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1655 * @since 18 1656 */ 1657 asyncDownloadAsset?: boolean; 1658 1659 /** 1660 * Specifies whether the cloud sync is enabled for the database. 1661 * 1662 * @type { ?boolean } 1663 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1664 * @since 18 1665 */ 1666 enableCloud?: boolean; 1667 } 1668 1669 /** 1670 * Describes the conflict resolutions to insert data into the table. 1671 * 1672 * @enum { number } 1673 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1674 * @crossplatform 1675 * @since 10 1676 */ 1677 enum ConflictResolution { 1678 /** 1679 * Implements no action when conflict occurs. 1680 * 1681 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1682 * @crossplatform 1683 * @since 10 1684 */ 1685 ON_CONFLICT_NONE = 0, 1686 1687 /** 1688 * Implements rollback operation when conflict occurs. 1689 * 1690 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1691 * @crossplatform 1692 * @since 10 1693 */ 1694 ON_CONFLICT_ROLLBACK = 1, 1695 1696 /** 1697 * Implements abort operation when conflict occurs. 1698 * 1699 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1700 * @crossplatform 1701 * @since 10 1702 */ 1703 ON_CONFLICT_ABORT = 2, 1704 1705 /** 1706 * Implements fail operation when conflict occurs. 1707 * 1708 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1709 * @crossplatform 1710 * @since 10 1711 */ 1712 ON_CONFLICT_FAIL = 3, 1713 1714 /** 1715 * Implements ignore operation when conflict occurs. 1716 * 1717 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1718 * @crossplatform 1719 * @since 10 1720 */ 1721 ON_CONFLICT_IGNORE = 4, 1722 1723 /** 1724 * Implements replace operation operator when conflict occurs. 1725 * 1726 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1727 * @crossplatform 1728 * @since 10 1729 */ 1730 ON_CONFLICT_REPLACE = 5 1731 } 1732 1733 /** 1734 * Describes the data origin sources. 1735 * 1736 * @enum { number } 1737 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1738 * @since 11 1739 */ 1740 enum Origin { 1741 /** 1742 * Indicates the data source is local. 1743 * 1744 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1745 * @since 11 1746 */ 1747 LOCAL, 1748 1749 /** 1750 * Indicates the data source is cloud. 1751 * 1752 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1753 * @since 11 1754 */ 1755 CLOUD, 1756 1757 /** 1758 * Indicates the data source is remote. 1759 * 1760 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1761 * @since 11 1762 */ 1763 REMOTE, 1764 } 1765 1766 /** 1767 * Enumerates the field. 1768 * 1769 * @enum { string } 1770 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1771 * @since 11 1772 */ 1773 /** 1774 * Enumerates the field. 1775 * 1776 * @enum { string } 1777 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1778 * @crossplatform 1779 * @since 20 1780 */ 1781 enum Field { 1782 /** 1783 * Cursor field. 1784 * 1785 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1786 * @since 11 1787 */ 1788 /** 1789 * Cursor field. 1790 * 1791 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1792 * @crossplatform 1793 * @since 20 1794 */ 1795 CURSOR_FIELD = '#_cursor', 1796 1797 /** 1798 * Origin field. For details, see {@link Origin}. 1799 * 1800 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1801 * @since 11 1802 */ 1803 /** 1804 * Origin field. For details, see {@link Origin}. 1805 * 1806 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1807 * @crossplatform 1808 * @since 20 1809 */ 1810 ORIGIN_FIELD = '#_origin', 1811 1812 /** 1813 * Deleted flag field. 1814 * Indicates whether data has deleted in cloud. 1815 * 1816 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1817 * @since 11 1818 */ 1819 /** 1820 * Deleted flag field. 1821 * Indicates whether data has deleted in cloud. 1822 * 1823 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1824 * @crossplatform 1825 * @since 20 1826 */ 1827 DELETED_FLAG_FIELD = '#_deleted_flag', 1828 1829 /** 1830 * Data status field. 1831 * Indicates data status. 1832 * 1833 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1834 * @since 12 1835 */ 1836 /** 1837 * Data status field. 1838 * Indicates data status. 1839 * 1840 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1841 * @crossplatform 1842 * @since 20 1843 */ 1844 DATA_STATUS_FIELD = '#_data_status', 1845 1846 /** 1847 * Owner field. 1848 * 1849 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1850 * @since 11 1851 */ 1852 /** 1853 * Owner field. 1854 * 1855 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1856 * @crossplatform 1857 * @since 20 1858 */ 1859 OWNER_FIELD = '#_cloud_owner', 1860 1861 /** 1862 * Privilege field. 1863 * 1864 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1865 * @since 11 1866 */ 1867 /** 1868 * Privilege field. 1869 * 1870 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1871 * @crossplatform 1872 * @since 20 1873 */ 1874 PRIVILEGE_FIELD = '#_cloud_privilege', 1875 1876 /** 1877 * Sharing resource field. 1878 * 1879 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1880 * @since 11 1881 */ 1882 /** 1883 * Sharing resource field. 1884 * 1885 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1886 * @crossplatform 1887 * @since 20 1888 */ 1889 SHARING_RESOURCE_FIELD = '#_sharing_resource_field' 1890 } 1891 1892 /** 1893 * Enumerates the type of rebuild. 1894 * 1895 * @enum { number } 1896 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1897 * @since 12 1898 */ 1899 enum RebuildType { 1900 /** 1901 * The database is not rebuilt or repaired. 1902 * 1903 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1904 * @since 12 1905 */ 1906 NONE, 1907 1908 /** 1909 * The database is rebuilt. 1910 * 1911 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1912 * @since 12 1913 */ 1914 REBUILT, 1915 1916 /** 1917 * The database is repaired. 1918 * 1919 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1920 * @since 12 1921 */ 1922 REPAIRED 1923 } 1924 1925 /** 1926 * Enumerates the type of transaction. 1927 * 1928 * @enum { number } 1929 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1930 * @since 14 1931 */ 1932 /** 1933 * Enumerates the type of transaction. 1934 * 1935 * @enum { number } 1936 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1937 * @crossplatform 1938 * @since 20 1939 */ 1940 enum TransactionType { 1941 /** 1942 * The DEFERRED transaction. 1943 * 1944 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1945 * @since 14 1946 */ 1947 /** 1948 * The DEFERRED transaction. 1949 * 1950 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1951 * @crossplatform 1952 * @since 20 1953 */ 1954 DEFERRED, 1955 1956 /** 1957 * The IMMEDIATE transaction. 1958 * 1959 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1960 * @since 14 1961 */ 1962 /** 1963 * The IMMEDIATE transaction. 1964 * 1965 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1966 * @crossplatform 1967 * @since 20 1968 */ 1969 IMMEDIATE, 1970 1971 /** 1972 * The EXCLUSIVE transaction. 1973 * 1974 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1975 * @since 14 1976 */ 1977 /** 1978 * The EXCLUSIVE transaction. 1979 * 1980 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1981 * @crossplatform 1982 * @since 20 1983 */ 1984 EXCLUSIVE 1985 } 1986 1987 /** 1988 * Create transaction options. 1989 * 1990 * @interface TransactionOptions 1991 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1992 * @since 14 1993 */ 1994 /** 1995 * Create transaction options. 1996 * 1997 * @interface TransactionOptions 1998 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1999 * @crossplatform 2000 * @since 20 2001 */ 2002 interface TransactionOptions { 2003 /** 2004 * The type of transaction. 2005 * 2006 * @type { TransactionType } 2007 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2008 * @since 14 2009 */ 2010 /** 2011 * The type of transaction. 2012 * 2013 * @type { TransactionType } 2014 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2015 * @crossplatform 2016 * @since 20 2017 */ 2018 transactionType?: TransactionType; 2019 } 2020 2021 /** 2022 * Enumerates the data types of a column. 2023 * 2024 * @enum { number } 2025 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2026 * @crossplatform 2027 * @since 18 2028 */ 2029 enum ColumnType { 2030 /** 2031 * The value in the column is null. 2032 * 2033 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2034 * @crossplatform 2035 * @since 18 2036 */ 2037 NULL, 2038 2039 /** 2040 * The value in the column is a 64-bit integer. It can be used to hold an 8-bit (including Boolean values), 16-bit, 2041 * 32-bit, or 64-bit integer.if the 64-bit integer is greater than 2^53 or less than -2^53, you can use getString 2042 * to convert the 64-bit integer into a string. 2043 * 2044 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2045 * @crossplatform 2046 * @since 18 2047 */ 2048 INTEGER, 2049 2050 /** 2051 * The value in the column is a floating point number. 2052 * 2053 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2054 * @crossplatform 2055 * @since 18 2056 */ 2057 REAL, 2058 2059 /** 2060 * The value in the column is a string. 2061 * 2062 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2063 * @crossplatform 2064 * @since 18 2065 */ 2066 TEXT, 2067 2068 /** 2069 * The value in the column is a Uint8Array. 2070 * 2071 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2072 * @crossplatform 2073 * @since 18 2074 */ 2075 BLOB, 2076 2077 /** 2078 * The value in the column is an asset. 2079 * 2080 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2081 * @crossplatform 2082 * @since 18 2083 */ 2084 ASSET, 2085 2086 /** 2087 * The value in the column is an array of assets. 2088 * 2089 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2090 * @crossplatform 2091 * @since 18 2092 */ 2093 ASSETS, 2094 2095 /** 2096 * The value in the column is a Float32Array. 2097 * 2098 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2099 * @crossplatform 2100 * @since 18 2101 */ 2102 FLOAT_VECTOR, 2103 2104 /** 2105 * The value in the column is a bigint. 2106 * 2107 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2108 * @crossplatform 2109 * @since 18 2110 */ 2111 UNLIMITED_INT, 2112 } 2113 2114 /** 2115 * Manages relational database configurations. 2116 * 2117 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2118 * @since 9 2119 */ 2120 /** 2121 * Manages relational database configurations. 2122 * 2123 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2124 * @crossplatform 2125 * @since arkts {'1.1':'10', '1.2':'20'} 2126 * @arkts 1.1&1.2 2127 */ 2128 class RdbPredicates { 2129 /** 2130 * A parameterized constructor used to create a RdbPredicates instance. 2131 * 2132 * @param { string } name - Indicates the table name of the database. 2133 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2134 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2135 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2136 * @since 9 2137 */ 2138 /** 2139 * A parameterized constructor used to create a RdbPredicates instance. 2140 * 2141 * @param { string } name - Indicates the table name of the database. 2142 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2143 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2144 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2145 * @crossplatform 2146 * @since arkts {'1.1':'10', '1.2':'20'} 2147 * @arkts 1.1&1.2 2148 */ 2149 constructor(name: string); 2150 2151 /** 2152 * Specifies remote devices which connect to local device when syncing distributed database. 2153 * When query database, this function should not be called. 2154 * 2155 * @param { Array<string> } devices - Indicates specified remote devices. 2156 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2157 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2158 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2159 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2160 * @since 9 2161 */ 2162 inDevices(devices: Array<string>): RdbPredicates; 2163 2164 /** 2165 * Specifies all remote devices which connect to local device when syncing distributed database. 2166 * When query database, this function should not be called. 2167 * 2168 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2169 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2170 * @since 9 2171 */ 2172 inAllDevices(): RdbPredicates; 2173 2174 /** 2175 * Configure the RdbPredicates to match the field whose data type is ValueType and value is equal 2176 * to a specified value. 2177 * This method is similar to = of the SQL statement. 2178 * 2179 * @param { string } field - Indicates the column name in the database table. 2180 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2181 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2182 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2183 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2184 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2185 * @since 9 2186 */ 2187 /** 2188 * Configure the RdbPredicates to match the field whose data type is ValueType and value is equal 2189 * to a specified value. 2190 * This method is similar to = of the SQL statement. 2191 * 2192 * @param { string } field - Indicates the column name in the database table. 2193 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2194 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2195 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2196 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2197 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2198 * @crossplatform 2199 * @since 10 2200 */ 2201 equalTo(field: string, value: ValueType): RdbPredicates; 2202 2203 /** 2204 * Configure the RdbPredicates to match the field whose data type is ValueType and value is not equal to 2205 * a specified value. 2206 * This method is similar to != of the SQL statement. 2207 * 2208 * @param { string } field - Indicates the column name in the database table. 2209 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2210 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2211 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2212 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2213 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2214 * @since 9 2215 */ 2216 /** 2217 * Configure the RdbPredicates to match the field whose data type is ValueType and value is not equal to 2218 * a specified value. 2219 * This method is similar to != of the SQL statement. 2220 * 2221 * @param { string } field - Indicates the column name in the database table. 2222 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2223 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2224 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2225 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2226 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2227 * @crossplatform 2228 * @since 10 2229 */ 2230 notEqualTo(field: string, value: ValueType): RdbPredicates; 2231 2232 /** 2233 * Adds a left parenthesis to the RdbPredicates. 2234 * This method is similar to ( of the SQL statement and needs to be used together with endWrap(). 2235 * 2236 * @returns { RdbPredicates } - The {@link RdbPredicates} with the left parenthesis. 2237 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2238 * @since 9 2239 */ 2240 /** 2241 * Adds a left parenthesis to the RdbPredicates. 2242 * This method is similar to ( of the SQL statement and needs to be used together with endWrap(). 2243 * 2244 * @returns { RdbPredicates } - The {@link RdbPredicates} with the left parenthesis. 2245 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2246 * @crossplatform 2247 * @since 10 2248 */ 2249 beginWrap(): RdbPredicates; 2250 2251 /** 2252 * Adds a right parenthesis to the RdbPredicates. 2253 * This method is similar to ) of the SQL statement and needs to be used together with beginWrap(). 2254 * 2255 * @returns { RdbPredicates } - The {@link RdbPredicates} with the right parenthesis. 2256 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2257 * @since 9 2258 */ 2259 /** 2260 * Adds a right parenthesis to the RdbPredicates. 2261 * This method is similar to ) of the SQL statement and needs to be used together with beginWrap(). 2262 * 2263 * @returns { RdbPredicates } - The {@link RdbPredicates} with the right parenthesis. 2264 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2265 * @crossplatform 2266 * @since 10 2267 */ 2268 endWrap(): RdbPredicates; 2269 2270 /** 2271 * Adds an or condition to the RdbPredicates. 2272 * This method is similar to or of the SQL statement. 2273 * 2274 * @returns { RdbPredicates } - The {@link RdbPredicates} with the or condition. 2275 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2276 * @since 9 2277 */ 2278 /** 2279 * Adds an or condition to the RdbPredicates. 2280 * This method is similar to or of the SQL statement. 2281 * 2282 * @returns { RdbPredicates } - The {@link RdbPredicates} with the or condition. 2283 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2284 * @crossplatform 2285 * @since 10 2286 */ 2287 or(): RdbPredicates; 2288 2289 /** 2290 * Adds an and condition to the RdbPredicates. 2291 * This method is similar to and of the SQL statement. 2292 * 2293 * @returns { RdbPredicates } - The {@link RdbPredicates} with the and condition. 2294 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2295 * @since 9 2296 */ 2297 /** 2298 * Adds an and condition to the RdbPredicates. 2299 * This method is similar to and of the SQL statement. 2300 * 2301 * @returns { RdbPredicates } - The {@link RdbPredicates} with the and condition. 2302 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2303 * @crossplatform 2304 * @since 10 2305 */ 2306 and(): RdbPredicates; 2307 2308 /** 2309 * Configure the RdbPredicates to match the field whose data type is string and value 2310 * contains a specified value. 2311 * This method is similar to contains of the SQL statement. 2312 * 2313 * @param { string } field - Indicates the column name in the database table. 2314 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2315 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2316 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2317 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2318 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2319 * @since 9 2320 */ 2321 /** 2322 * Configure the RdbPredicates to match the field whose data type is string and value 2323 * contains a specified value. 2324 * This method is similar to contains of the SQL statement. 2325 * 2326 * @param { string } field - Indicates the column name in the database table. 2327 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2328 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2329 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2330 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2331 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2332 * @crossplatform 2333 * @since 10 2334 */ 2335 contains(field: string, value: string): RdbPredicates; 2336 2337 /** 2338 * Configure the RdbPredicates to match the field whose data type is string and value starts 2339 * with a specified string. 2340 * This method is similar to value% of the SQL statement. 2341 * 2342 * @param { string } field - Indicates the column name in the database table. 2343 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2344 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2345 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2346 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2347 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2348 * @since 9 2349 */ 2350 /** 2351 * Configure the RdbPredicates to match the field whose data type is string and value starts 2352 * with a specified string. 2353 * This method is similar to value% of the SQL statement. 2354 * 2355 * @param { string } field - Indicates the column name in the database table. 2356 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2357 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2358 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2359 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2360 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2361 * @crossplatform 2362 * @since 10 2363 */ 2364 beginsWith(field: string, value: string): RdbPredicates; 2365 2366 /** 2367 * Configure the RdbPredicates to match the field whose data type is string and value 2368 * ends with a specified string. 2369 * This method is similar to %value of the SQL statement. 2370 * 2371 * @param { string } field - Indicates the column name in the database table. 2372 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2373 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2374 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2375 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2376 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2377 * @since 9 2378 */ 2379 /** 2380 * Configure the RdbPredicates to match the field whose data type is string and value 2381 * ends with a specified string. 2382 * This method is similar to %value of the SQL statement. 2383 * 2384 * @param { string } field - Indicates the column name in the database table. 2385 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2386 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2387 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2388 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2389 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2390 * @crossplatform 2391 * @since 10 2392 */ 2393 endsWith(field: string, value: string): RdbPredicates; 2394 2395 /** 2396 * Configure the RdbPredicates to match the fields whose value is null. 2397 * This method is similar to is null of the SQL statement. 2398 * 2399 * @param { string } field - Indicates the column name in the database table. 2400 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2401 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2402 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2403 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2404 * @since 9 2405 */ 2406 /** 2407 * Configure the RdbPredicates to match the fields whose value is null. 2408 * This method is similar to is null of the SQL statement. 2409 * 2410 * @param { string } field - Indicates the column name in the database table. 2411 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2412 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2413 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2414 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2415 * @crossplatform 2416 * @since 10 2417 */ 2418 isNull(field: string): RdbPredicates; 2419 2420 /** 2421 * Configure the RdbPredicates to match the specified fields whose value is not null. 2422 * This method is similar to is not null of the SQL statement. 2423 * 2424 * @param { string } field - Indicates the column name in the database table. 2425 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2426 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2427 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2428 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2429 * @since 9 2430 */ 2431 /** 2432 * Configure the RdbPredicates to match the specified fields whose value is not null. 2433 * This method is similar to is not null of the SQL statement. 2434 * 2435 * @param { string } field - Indicates the column name in the database table. 2436 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 2437 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2438 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2439 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2440 * @crossplatform 2441 * @since 10 2442 */ 2443 isNotNull(field: string): RdbPredicates; 2444 2445 /** 2446 * Configure the RdbPredicates to match the fields whose data type is string and value is 2447 * similar to a specified string. 2448 * This method is similar to like of the SQL statement. 2449 * 2450 * @param { string } field - Indicates the column name in the database table. 2451 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2452 * @returns { RdbPredicates } - The {@link RdbPredicates} that match the specified field. 2453 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2454 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2455 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2456 * @since 9 2457 */ 2458 /** 2459 * Configure the RdbPredicates to match the fields whose data type is string and value is 2460 * similar to a specified string. 2461 * This method is similar to like of the SQL statement. 2462 * 2463 * @param { string } field - Indicates the column name in the database table. 2464 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2465 * @returns { RdbPredicates } - The {@link RdbPredicates} that match the specified field. 2466 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2467 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2468 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2469 * @crossplatform 2470 * @since 10 2471 */ 2472 like(field: string, value: string): RdbPredicates; 2473 2474 /** 2475 * Configure RdbPredicates to match the specified field whose data type is string and the value contains 2476 * a wildcard. 2477 * Different from like, the input parameters of this method are case-sensitive. 2478 * 2479 * @param { string } field - Indicates the column name in the database table. 2480 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2481 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2482 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2483 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2484 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2485 * @since 9 2486 */ 2487 /** 2488 * Configure RdbPredicates to match the specified field whose data type is string and the value contains 2489 * a wildcard. 2490 * Different from like, the input parameters of this method are case-sensitive. 2491 * 2492 * @param { string } field - Indicates the column name in the database table. 2493 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2494 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2495 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2496 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2497 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2498 * @crossplatform 2499 * @since 10 2500 */ 2501 glob(field: string, value: string): RdbPredicates; 2502 2503 /** 2504 * Configure RdbPredicates to match the specified field whose value is within a given range. 2505 * 2506 * @param { string } field - Indicates the column name. 2507 * @param { ValueType } low - Indicates the minimum value. 2508 * @param { ValueType } high - Indicates the maximum value. 2509 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2510 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2511 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2512 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2513 * @since 9 2514 */ 2515 /** 2516 * Configure RdbPredicates to match the specified field whose value is within a given range. 2517 * 2518 * @param { string } field - Indicates the column name. 2519 * @param { ValueType } low - Indicates the minimum value. 2520 * @param { ValueType } high - Indicates the maximum value. 2521 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2522 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2523 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2524 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2525 * @crossplatform 2526 * @since 10 2527 */ 2528 between(field: string, low: ValueType, high: ValueType): RdbPredicates; 2529 2530 /** 2531 * Configure RdbPredicates to match the specified field whose value is out of a given range. 2532 * 2533 * @param { string } field - Indicates the column name in the database table. 2534 * @param { ValueType } low - Indicates the minimum value. 2535 * @param { ValueType } high - Indicates the maximum value. 2536 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2537 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2538 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2539 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2540 * @since 9 2541 */ 2542 /** 2543 * Configure RdbPredicates to match the specified field whose value is out of a given range. 2544 * 2545 * @param { string } field - Indicates the column name in the database table. 2546 * @param { ValueType } low - Indicates the minimum value. 2547 * @param { ValueType } high - Indicates the maximum value. 2548 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2549 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2550 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2551 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2552 * @crossplatform 2553 * @since 10 2554 */ 2555 notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates; 2556 2557 /** 2558 * Restricts the value of the field to be greater than the specified value. 2559 * 2560 * @param { string } field - Indicates the column name in the database table. 2561 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2562 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2563 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2564 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2565 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2566 * @since 9 2567 */ 2568 /** 2569 * Restricts the value of the field to be greater than the specified value. 2570 * 2571 * @param { string } field - Indicates the column name in the database table. 2572 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2573 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2574 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2575 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2576 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2577 * @crossplatform 2578 * @since 10 2579 */ 2580 greaterThan(field: string, value: ValueType): RdbPredicates; 2581 2582 /** 2583 * Restricts the value of the field to be smaller than the specified value. 2584 * 2585 * @param { string } field - Indicates the column name in the database table. 2586 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2587 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2588 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2589 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2590 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2591 * @since 9 2592 */ 2593 /** 2594 * Restricts the value of the field to be smaller than the specified value. 2595 * 2596 * @param { string } field - Indicates the column name in the database table. 2597 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2598 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2599 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2600 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2601 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2602 * @crossplatform 2603 * @since 10 2604 */ 2605 lessThan(field: string, value: ValueType): RdbPredicates; 2606 2607 /** 2608 * Restricts the value of the field to be greater than or equal to the specified value. 2609 * 2610 * @param { string } field - Indicates the column name in the database table. 2611 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2612 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2613 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2614 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2615 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2616 * @since 9 2617 */ 2618 /** 2619 * Restricts the value of the field to be greater than or equal to the specified value. 2620 * 2621 * @param { string } field - Indicates the column name in the database table. 2622 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2623 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2624 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2625 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2626 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2627 * @crossplatform 2628 * @since 10 2629 */ 2630 greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates; 2631 2632 /** 2633 * Restricts the value of the field to be smaller than or equal to the specified value. 2634 * 2635 * @param { string } field - Indicates the column name in the database table. 2636 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2637 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2638 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2639 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2640 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2641 * @since 9 2642 */ 2643 /** 2644 * Restricts the value of the field to be smaller than or equal to the specified value. 2645 * 2646 * @param { string } field - Indicates the column name in the database table. 2647 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2648 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2649 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2650 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2651 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2652 * @crossplatform 2653 * @since 10 2654 */ 2655 lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates; 2656 2657 /** 2658 * Restricts the ascending order of the return list. When there are several orders, 2659 * the one close to the head has the highest priority. 2660 * 2661 * @param { string } field - Indicates the column name for sorting the return list. 2662 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2663 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2664 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2665 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2666 * @since 9 2667 */ 2668 /** 2669 * Restricts the ascending order of the return list. When there are several orders, 2670 * the one close to the head has the highest priority. 2671 * 2672 * @param { string } field - Indicates the column name for sorting the return list. 2673 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2674 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2675 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2676 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2677 * @crossplatform 2678 * @since 10 2679 */ 2680 orderByAsc(field: string): RdbPredicates; 2681 2682 /** 2683 * Restricts the descending order of the return list. When there are several orders, 2684 * the one close to the head has the highest priority. 2685 * 2686 * @param { string } field - Indicates the column name for sorting the return list. 2687 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2688 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2689 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2690 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2691 * @since 9 2692 */ 2693 /** 2694 * Restricts the descending order of the return list. When there are several orders, 2695 * the one close to the head has the highest priority. 2696 * 2697 * @param { string } field - Indicates the column name for sorting the return list. 2698 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2699 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2700 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2701 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2702 * @crossplatform 2703 * @since 10 2704 */ 2705 orderByDesc(field: string): RdbPredicates; 2706 2707 /** 2708 * Restricts each row of the query result to be unique. 2709 * 2710 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2711 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2712 * @since 9 2713 */ 2714 /** 2715 * Restricts each row of the query result to be unique. 2716 * 2717 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2718 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2719 * @crossplatform 2720 * @since 10 2721 */ 2722 distinct(): RdbPredicates; 2723 2724 /** 2725 * Restricts the max number of return records. 2726 * 2727 * @param { number } value - Indicates the max length of the return list. 2728 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2729 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2730 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2731 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2732 * @since 9 2733 */ 2734 /** 2735 * Restricts the max number of return records. 2736 * 2737 * @param { number } value - Indicates the max length of the return list. 2738 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2739 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2740 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2741 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2742 * @crossplatform 2743 * @since 10 2744 */ 2745 limitAs(value: number): RdbPredicates; 2746 2747 /** 2748 * Configure RdbPredicates to specify the start position of the returned result. 2749 * Use this method together with limit(number). 2750 * 2751 * @param { number } rowOffset - Indicates the start position of the returned result. 2752 * The value is a positive integer. 2753 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2754 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2755 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2756 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2757 * @since 9 2758 */ 2759 /** 2760 * Configure RdbPredicates to specify the start position of the returned result. 2761 * Use this method together with limit(number). 2762 * 2763 * @param { number } rowOffset - Indicates the start position of the returned result. 2764 * The value is a positive integer. 2765 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2766 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2767 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2768 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2769 * @crossplatform 2770 * @since 10 2771 */ 2772 offsetAs(rowOffset: number): RdbPredicates; 2773 2774 /** 2775 * Configure RdbPredicates to group query results by specified columns. 2776 * 2777 * @param { Array<string> } fields - Indicates the specified columns by which query results are grouped. 2778 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2779 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2780 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2781 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2782 * @since 9 2783 */ 2784 /** 2785 * Configure RdbPredicates to group query results by specified columns. 2786 * 2787 * @param { Array<string> } fields - Indicates the specified columns by which query results are grouped. 2788 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2789 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2790 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2791 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2792 * @crossplatform 2793 * @since 10 2794 */ 2795 groupBy(fields: Array<string>): RdbPredicates; 2796 2797 /** 2798 * Configure RdbPredicates to specify the index column. 2799 * Before using this method, you need to create an index column. 2800 * 2801 * @param { string } field - Indicates the name of the index column. 2802 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2803 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2804 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2805 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2806 * @since 9 2807 */ 2808 /** 2809 * Configure RdbPredicates to specify the index column. 2810 * Before using this method, you need to create an index column. 2811 * 2812 * @param { string } field - Indicates the name of the index column. 2813 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2814 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2815 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2816 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2817 * @crossplatform 2818 * @since 10 2819 */ 2820 indexedBy(field: string): RdbPredicates; 2821 2822 /** 2823 * Configure RdbPredicates to match the specified field whose data type is ValueType array and values 2824 * are within a given range. 2825 * 2826 * @param { string } field - Indicates the column name in the database table. 2827 * @param { Array<ValueType> } value - Indicates the values to match with {@link RdbPredicates}. 2828 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2829 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2830 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2831 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2832 * @since 9 2833 */ 2834 /** 2835 * Configure RdbPredicates to match the specified field whose data type is ValueType array and values 2836 * are within a given range. 2837 * 2838 * @param { string } field - Indicates the column name in the database table. 2839 * @param { Array<ValueType> } value - Indicates the values to match with {@link RdbPredicates}. 2840 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2841 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2842 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2843 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2844 * @crossplatform 2845 * @since 10 2846 */ 2847 in(field: string, value: Array<ValueType>): RdbPredicates; 2848 2849 /** 2850 * Configure RdbPredicates to match the specified field whose data type is ValueType array and values 2851 * are out of a given range. 2852 * 2853 * @param { string } field - Indicates the column name in the database table. 2854 * @param { Array<ValueType> } value - Indicates the values to match with {@link RdbPredicates}. 2855 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2856 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2857 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2858 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2859 * @since 9 2860 */ 2861 /** 2862 * Configure RdbPredicates to match the specified field whose data type is ValueType array and values 2863 * are out of a given range. 2864 * 2865 * @param { string } field - Indicates the column name in the database table. 2866 * @param { Array<ValueType> } value - Indicates the values to match with {@link RdbPredicates}. 2867 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2868 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2869 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2870 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2871 * @crossplatform 2872 * @since 10 2873 */ 2874 notIn(field: string, value: Array<ValueType>): RdbPredicates; 2875 2876 /** 2877 * Sets the RdbPredicates to match the field whose data type is string and value 2878 * does not contain the specified value. 2879 * This method is similar to "Not like %value%" of the SQL statement. 2880 * 2881 * @param { string } field - Indicates the column name in the database table. 2882 * @param { string } value - Indicates the value that is not contained. 2883 * @returns { RdbPredicates } - The {@Link RdbPredicates} set. 2884 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2885 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2886 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2887 * @since 12 2888 */ 2889 /** 2890 * Sets the RdbPredicates to match the field whose data type is string and value 2891 * does not contain the specified value. 2892 * This method is similar to "Not like %value%" of the SQL statement. 2893 * 2894 * @param { string } field - Indicates the column name in the database table. 2895 * @param { string } value - Indicates the value that is not contained. 2896 * @returns { RdbPredicates } - The {@Link RdbPredicates} set. 2897 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2898 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2899 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2900 * @crossplatform 2901 * @since 20 2902 */ 2903 notContains(field: string, value: string): RdbPredicates; 2904 2905 /** 2906 * Sets the RdbPredicates to match the field whose data type is string and value 2907 * is not like the specified value. 2908 * This method is similar to "Not like" of the SQL statement. 2909 * 2910 * @param { string } field - Indicates the column name in the database table. 2911 * @param { string } value - Indicates the value to compare against. 2912 * @returns { RdbPredicates } - The {@Link RdbPredicates} set. 2913 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2914 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2915 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2916 * @since 12 2917 */ 2918 /** 2919 * Sets the RdbPredicates to match the field whose data type is string and value 2920 * is not like the specified value. 2921 * This method is similar to "Not like" of the SQL statement. 2922 * 2923 * @param { string } field - Indicates the column name in the database table. 2924 * @param { string } value - Indicates the value to compare against. 2925 * @returns { RdbPredicates } - The {@Link RdbPredicates} set. 2926 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2927 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 2928 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2929 * @crossplatform 2930 * @since 20 2931 */ 2932 notLike(field: string, value: string): RdbPredicates; 2933 2934 /** 2935 * Filters the grouped data that meets the specified conditions. 2936 * 2937 * @param { string } conditions - Conditions used to filter the data obtained using GROUP BY. 2938 * @param { Array<ValueType> } args - Parameters to be used in the conditions. 2939 * @returns { RdbPredicates } - Returns the RdbPredicates object. 2940 * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range; 2941 * <br>2. Missing GROUP BY clause. 2942 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2943 * @crossplatform 2944 * @since 20 2945 */ 2946 having(conditions:string, args?: Array<ValueType>): RdbPredicates; 2947 } 2948 2949 /** 2950 * Provides methods for accessing a database result set generated by querying the database. 2951 * 2952 * @interface ResultSet 2953 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2954 * @since 9 2955 */ 2956 /** 2957 * Provides methods for accessing a database result set generated by querying the database. 2958 * 2959 * @interface ResultSet 2960 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2961 * @crossplatform 2962 * @since arkts {'1.1':'10', '1.2':'20'} 2963 * @arkts 1.1&1.2 2964 */ 2965 interface ResultSet { 2966 /** 2967 * Obtains the names of all columns in a result set. 2968 * The column names are returned as a string array, in which the strings are in the same order 2969 * as the columns in the result set. 2970 * 2971 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2972 * @since 9 2973 */ 2974 /** 2975 * Obtains the names of all columns in a result set. 2976 * The column names are returned as a string array, in which the strings are in the same order 2977 * as the columns in the result set. 2978 * 2979 * @type { Array<string> } 2980 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2981 * @crossplatform 2982 * @since 10 2983 */ 2984 columnNames: Array<string>; 2985 2986 /** 2987 * Obtains the number of columns in the result set. 2988 * The returned number is equal to the length of the string array returned by the 2989 * columnNames method. 2990 * 2991 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2992 * @since 9 2993 */ 2994 /** 2995 * Obtains the number of columns in the result set. 2996 * The returned number is equal to the length of the string array returned by the 2997 * columnNames method. 2998 * 2999 * @type { number } 3000 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3001 * @crossplatform 3002 * @since 10 3003 */ 3004 columnCount: number; 3005 3006 /** 3007 * Obtains the number of rows in the result set. 3008 * 3009 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3010 * @since 9 3011 */ 3012 /** 3013 * Obtains the number of rows in the result set. 3014 * 3015 * @type { number } 3016 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3017 * @crossplatform 3018 * @since 10 3019 */ 3020 rowCount: number; 3021 3022 /** 3023 * Obtains the current index of the result set. 3024 * The result set index starts from 0. 3025 * 3026 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3027 * @since 9 3028 */ 3029 /** 3030 * Obtains the current index of the result set. 3031 * The result set index starts from 0. 3032 * 3033 * @type { number } 3034 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3035 * @crossplatform 3036 * @since 10 3037 */ 3038 rowIndex: number; 3039 3040 /** 3041 * Checks whether the cursor is positioned at the first row. 3042 * 3043 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3044 * @since 9 3045 */ 3046 /** 3047 * Checks whether the cursor is positioned at the first row. 3048 * 3049 * @type { boolean } 3050 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3051 * @crossplatform 3052 * @since 10 3053 */ 3054 isAtFirstRow: boolean; 3055 3056 /** 3057 * Checks whether the cursor is positioned at the last row. 3058 * 3059 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3060 * @since 9 3061 */ 3062 /** 3063 * Checks whether the cursor is positioned at the last row. 3064 * 3065 * @type { boolean } 3066 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3067 * @crossplatform 3068 * @since 10 3069 */ 3070 isAtLastRow: boolean; 3071 3072 /** 3073 * Checks whether the cursor is positioned after the last row. 3074 * 3075 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3076 * @since 9 3077 */ 3078 /** 3079 * Checks whether the cursor is positioned after the last row. 3080 * 3081 * @type { boolean } 3082 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3083 * @crossplatform 3084 * @since 10 3085 */ 3086 isEnded: boolean; 3087 3088 /** 3089 * Checks whether the cursor is positioned before the first row. 3090 * 3091 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3092 * @since 9 3093 */ 3094 /** 3095 * Checks whether the cursor is positioned before the first row. 3096 * 3097 * @type { boolean } 3098 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3099 * @crossplatform 3100 * @since 10 3101 */ 3102 isStarted: boolean; 3103 3104 /** 3105 * Checks whether the current result set is closed. 3106 * If the result set is closed by calling the close method, true will be returned. 3107 * 3108 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3109 * @since 9 3110 */ 3111 /** 3112 * Checks whether the current result set is closed. 3113 * If the result set is closed by calling the close method, true will be returned. 3114 * 3115 * @type { boolean } 3116 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3117 * @crossplatform 3118 * @since 10 3119 */ 3120 isClosed: boolean; 3121 3122 /** 3123 * Obtains the column index based on the specified column name. 3124 * The column name is passed as an input parameter. 3125 * 3126 * @param { string } columnName - Indicates the name of the specified column in the result set. 3127 * @returns { number } The index of the specified column. 3128 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3129 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3130 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3131 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3132 * @since 9 3133 */ 3134 /** 3135 * Obtains the column index based on the specified column name. 3136 * The column name is passed as an input parameter. 3137 * 3138 * @param { string } columnName - Indicates the name of the specified column in the result set. 3139 * @returns { number } The index of the specified column. 3140 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3141 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3142 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3143 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3144 * @crossplatform 3145 * @since 10 3146 */ 3147 /** 3148 * Obtains the column index based on the specified column name. 3149 * The column name is passed as an input parameter. 3150 * 3151 * @param { string } columnName - Indicates the name of the specified column in the result set. 3152 * @returns { number } The index of the specified column. 3153 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3154 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3155 * @throws { BusinessError } 14800000 - Inner error. 3156 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3157 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3158 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3159 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3160 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3161 * Possible causes: Insert failed or the updated data does not exist. 3162 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3163 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3164 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3165 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3166 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3167 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3168 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3169 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3170 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3171 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3172 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3173 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3174 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3175 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3176 * @crossplatform 3177 * @since arkts {'1.1':'12', '1.2':'20'} 3178 * @arkts 1.1&1.2 3179 */ 3180 getColumnIndex(columnName: string): number; 3181 3182 /** 3183 * Obtains the column name based on the specified column index. 3184 * The column index is passed as an input parameter. 3185 * 3186 * @param { number } columnIndex - Indicates the index of the specified column in the result set. 3187 * @returns { string } The name of the specified column. 3188 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3189 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3190 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3191 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3192 * @since 9 3193 */ 3194 /** 3195 * Obtains the column name based on the specified column index. 3196 * The column index is passed as an input parameter. 3197 * 3198 * @param { number } columnIndex - Indicates the index of the specified column in the result set. 3199 * @returns { string } The name of the specified column. 3200 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3201 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3202 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3203 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3204 * @crossplatform 3205 * @since 10 3206 */ 3207 /** 3208 * Obtains the column name based on the specified column index. 3209 * The column index is passed as an input parameter. 3210 * 3211 * @param { number } columnIndex - Indicates the index of the specified column in the result set. 3212 * @returns { string } The name of the specified column. 3213 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3214 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3215 * @throws { BusinessError } 14800000 - Inner error. 3216 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3217 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3218 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3219 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3220 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3221 * Possible causes: Insert failed or the updated data does not exist. 3222 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3223 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3224 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3225 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3226 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3227 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3228 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3229 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3230 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3231 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3232 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3233 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3234 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3235 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3236 * @crossplatform 3237 * @since 12 3238 */ 3239 getColumnName(columnIndex: number): string; 3240 3241 /** 3242 * Obtains the column data type based on the specified column index. 3243 * The column index is passed as an input parameter. 3244 * 3245 * @param { number | string } columnIdentifier - Index or name of the column. 3246 * @returns { Promise<ColumnType> } Promise used to return the data type obtained, 3247 * in an {@link ColumnType} instance. 3248 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3249 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3250 * @throws { BusinessError } 14800000 - Inner error. 3251 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3252 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3253 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3254 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3255 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3256 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3257 * Possible causes: Insert failed or the updated data does not exist. 3258 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3259 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3260 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3261 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3262 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3263 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3264 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3265 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3266 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3267 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3268 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3269 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3270 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3271 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3272 * @crossplatform 3273 * @since 18 3274 */ 3275 getColumnType(columnIdentifier: number | string): Promise<ColumnType>; 3276 3277 /** 3278 * Obtains the column data type based on the specified column index. This API returns the result synchronously. 3279 * 3280 * @param { number | string } columnIdentifier - Index or name of the column. 3281 * @returns { ColumnType } Column data type obtained. 3282 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3283 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3284 * @throws { BusinessError } 14800000 - Inner error. 3285 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3286 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3287 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3288 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3289 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3290 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3291 * Possible causes: Insert failed or the updated data does not exist. 3292 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3293 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3294 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3295 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3296 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3297 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3298 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3299 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3300 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3301 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3302 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3303 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3304 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3305 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3306 * @crossplatform 3307 * @since 18 3308 */ 3309 getColumnTypeSync(columnIdentifier: number | string): ColumnType; 3310 3311 /** 3312 * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. 3313 * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. 3314 * 3315 * @param { number } offset - Indicates the offset relative to the current position. 3316 * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; 3317 * Returns false otherwise. 3318 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3319 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3320 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3321 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3322 * @since 9 3323 */ 3324 /** 3325 * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. 3326 * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. 3327 * 3328 * @param { number } offset - Indicates the offset relative to the current position. 3329 * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; 3330 * Returns false otherwise. 3331 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3332 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3333 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3334 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3335 * @crossplatform 3336 * @since 10 3337 */ 3338 /** 3339 * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. 3340 * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. 3341 * 3342 * @param { number } offset - Indicates the offset relative to the current position. 3343 * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; 3344 * Returns false otherwise. 3345 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3346 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3347 * @throws { BusinessError } 14800000 - Inner error. 3348 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3349 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3350 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3351 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3352 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3353 * Possible causes: Insert failed or the updated data does not exist. 3354 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3355 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3356 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3357 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3358 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3359 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3360 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3361 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3362 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3363 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3364 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3365 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3366 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3367 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3368 * @crossplatform 3369 * @since 12 3370 */ 3371 goTo(offset: number): boolean; 3372 3373 /** 3374 * Go to the specified row of the result set. 3375 * 3376 * @param { number } position - Indicates the index of the specified row, which starts from 0. 3377 * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. 3378 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3379 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3380 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3381 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3382 * @since 9 3383 */ 3384 /** 3385 * Go to the specified row of the result set. 3386 * 3387 * @param { number } position - Indicates the index of the specified row, which starts from 0. 3388 * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. 3389 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3390 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3391 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3392 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3393 * @crossplatform 3394 * @since 10 3395 */ 3396 /** 3397 * Go to the specified row of the result set. 3398 * 3399 * @param { number } position - Indicates the index of the specified row, which starts from 0. 3400 * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. 3401 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3402 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3403 * @throws { BusinessError } 14800000 - Inner error. 3404 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3405 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3406 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3407 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3408 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3409 * Possible causes: Insert failed or the updated data does not exist. 3410 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3411 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3412 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3413 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3414 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3415 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3416 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3417 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3418 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3419 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3420 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3421 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3422 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3423 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3424 * @crossplatform 3425 * @since 12 3426 */ 3427 goToRow(position: number): boolean; 3428 3429 /** 3430 * Go to the first row of the result set. 3431 * 3432 * @returns { boolean } True if the result set is moved successfully; 3433 * Returns false otherwise, for example, if the result set is empty. 3434 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3435 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3436 * @since 9 3437 */ 3438 /** 3439 * Go to the first row of the result set. 3440 * 3441 * @returns { boolean } True if the result set is moved successfully; 3442 * Returns false otherwise, for example, if the result set is empty. 3443 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3444 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3445 * @crossplatform 3446 * @since 10 3447 */ 3448 /** 3449 * Go to the first row of the result set. 3450 * 3451 * @returns { boolean } True if the result set is moved successfully; 3452 * Returns false otherwise, for example, if the result set is empty. 3453 * @throws { BusinessError } 14800000 - Inner error. 3454 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3455 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3456 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3457 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3458 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3459 * Possible causes: Insert failed or the updated data does not exist. 3460 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3461 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3462 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3463 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3464 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3465 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3466 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3467 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3468 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3469 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3470 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3471 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3472 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3473 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3474 * @crossplatform 3475 * @since arkts {'1.1':'12', '1.2':'20'} 3476 * @arkts 1.1&1.2 3477 */ 3478 goToFirstRow(): boolean; 3479 3480 /** 3481 * Go to the last row of the result set. 3482 * 3483 * @returns { boolean } True if the result set is moved successfully; 3484 * Returns false otherwise, for example, if the result set is empty. 3485 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3486 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3487 * @since 9 3488 */ 3489 /** 3490 * Go to the last row of the result set. 3491 * 3492 * @returns { boolean } True if the result set is moved successfully; 3493 * Returns false otherwise, for example, if the result set is empty. 3494 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3495 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3496 * @crossplatform 3497 * @since 10 3498 */ 3499 /** 3500 * Go to the last row of the result set. 3501 * 3502 * @returns { boolean } True if the result set is moved successfully; 3503 * Returns false otherwise, for example, if the result set is empty. 3504 * @throws { BusinessError } 14800000 - Inner error. 3505 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3506 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3507 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3508 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3509 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3510 * Possible causes: Insert failed or the updated data does not exist. 3511 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3512 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3513 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3514 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3515 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3516 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3517 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3518 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3519 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3520 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3521 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3522 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3523 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3524 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3525 * @crossplatform 3526 * @since 12 3527 */ 3528 goToLastRow(): boolean; 3529 3530 /** 3531 * Go to the next row of the result set. 3532 * 3533 * @returns { boolean } True if the result set is moved successfully; 3534 * Returns false otherwise, for example, if the result set is already in the last row. 3535 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3536 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3537 * @since 9 3538 */ 3539 /** 3540 * Go to the next row of the result set. 3541 * 3542 * @returns { boolean } True if the result set is moved successfully; 3543 * Returns false otherwise, for example, if the result set is already in the last row. 3544 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3545 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3546 * @crossplatform 3547 * @since 10 3548 */ 3549 /** 3550 * Go to the next row of the result set. 3551 * 3552 * @returns { boolean } True if the result set is moved successfully; 3553 * Returns false otherwise, for example, if the result set is already in the last row. 3554 * @throws { BusinessError } 14800000 - Inner error. 3555 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3556 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3557 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3558 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3559 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3560 * Possible causes: Insert failed or the updated data does not exist. 3561 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3562 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3563 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3564 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3565 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3566 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3567 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3568 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3569 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3570 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3571 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3572 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3573 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3574 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3575 * @crossplatform 3576 * @since 12 3577 */ 3578 goToNextRow(): boolean; 3579 3580 /** 3581 * Go to the previous row of the result set. 3582 * 3583 * @returns { boolean } True if the result set is moved successfully; 3584 * Returns false otherwise, for example, if the result set is already in the first row. 3585 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3586 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3587 * @since 9 3588 */ 3589 /** 3590 * Go to the previous row of the result set. 3591 * 3592 * @returns { boolean } True if the result set is moved successfully; 3593 * Returns false otherwise, for example, if the result set is already in the first row. 3594 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3595 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3596 * @crossplatform 3597 * @since 10 3598 */ 3599 /** 3600 * Go to the previous row of the result set. 3601 * 3602 * @returns { boolean } True if the result set is moved successfully; 3603 * Returns false otherwise, for example, if the result set is already in the first row. 3604 * @throws { BusinessError } 14800000 - Inner error. 3605 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3606 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3607 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3608 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3609 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3610 * Possible causes: Insert failed or the updated data does not exist. 3611 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3612 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3613 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3614 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3615 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3616 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3617 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3618 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3619 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3620 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3621 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3622 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3623 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3624 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3625 * @crossplatform 3626 * @since 12 3627 */ 3628 goToPreviousRow(): boolean; 3629 3630 /** 3631 * Obtains the value of the specified column in the current row as a byte array. 3632 * The implementation class determines whether to throw an exception if the value of the specified column 3633 * in the current row is null or the specified column is not of the Blob type. 3634 * 3635 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3636 * @returns { Uint8Array } The value of the specified column as a byte array. 3637 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3638 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3639 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3640 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3641 * @since 9 3642 */ 3643 /** 3644 * Obtains the value of the specified column in the current row as a byte array. 3645 * The implementation class determines whether to throw an exception if the value of the specified column 3646 * in the current row is null or the specified column is not of the Blob type. 3647 * 3648 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3649 * @returns { Uint8Array } The value of the specified column as a byte array. 3650 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3651 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3652 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3653 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3654 * @crossplatform 3655 * @since 10 3656 */ 3657 /** 3658 * Obtains the value of the specified column in the current row as a byte array. 3659 * The implementation class determines whether to throw an exception if the value of the specified column 3660 * in the current row is null or the specified column is not of the Blob type. 3661 * 3662 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3663 * @returns { Uint8Array } The value of the specified column as a byte array. 3664 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3665 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3666 * @throws { BusinessError } 14800000 - Inner error. 3667 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3668 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3669 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3670 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3671 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3672 * Possible causes: Insert failed or the updated data does not exist. 3673 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3674 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3675 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3676 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3677 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3678 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3679 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3680 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3681 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3682 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3683 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3684 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3685 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3686 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3687 * @crossplatform 3688 * @since 12 3689 */ 3690 getBlob(columnIndex: number): Uint8Array; 3691 3692 /** 3693 * Obtains the value of the specified column in the current row as string. 3694 * The implementation class determines whether to throw an exception if the value of the specified column 3695 * in the current row is null or the specified column is not of the string type. 3696 * 3697 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3698 * @returns { string } The value of the specified column as a string. 3699 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3700 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3701 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3702 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3703 * @since 9 3704 */ 3705 /** 3706 * Obtains the value of the specified column in the current row as string. 3707 * The implementation class determines whether to throw an exception if the value of the specified column 3708 * in the current row is null or the specified column is not of the string type. 3709 * 3710 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3711 * @returns { string } The value of the specified column as a string. 3712 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3713 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3714 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3715 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3716 * @crossplatform 3717 * @since 10 3718 */ 3719 /** 3720 * Obtains the value of the specified column in the current row as string. 3721 * The implementation class determines whether to throw an exception if the value of the specified column 3722 * in the current row is null or the specified column is not of the string type. 3723 * 3724 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3725 * @returns { string } The value of the specified column as a string. 3726 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3727 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3728 * @throws { BusinessError } 14800000 - Inner error. 3729 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3730 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3731 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3732 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3733 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3734 * Possible causes: Insert failed or the updated data does not exist. 3735 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3736 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3737 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3738 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3739 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3740 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3741 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3742 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3743 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3744 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3745 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3746 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3747 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3748 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3749 * @crossplatform 3750 * @since arkts {'1.1':'12', '1.2':'20'} 3751 * @arkts 1.1&1.2 3752 */ 3753 getString(columnIndex: number): string; 3754 3755 /** 3756 * Obtains the value of the specified column in the current row as long. 3757 * The implementation class determines whether to throw an exception if the value of the specified column 3758 * in the current row is null, the specified column is not of the integer type. 3759 * 3760 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3761 * @returns { number } The value of the specified column as a long. 3762 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3763 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3764 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3765 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3766 * @since 9 3767 */ 3768 /** 3769 * Obtains the value of the specified column in the current row as long. 3770 * The implementation class determines whether to throw an exception if the value of the specified column 3771 * in the current row is null, the specified column is not of the integer type. 3772 * 3773 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3774 * @returns { number } The value of the specified column as a long. 3775 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3776 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3777 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3778 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3779 * @crossplatform 3780 * @since 10 3781 */ 3782 /** 3783 * Obtains the value of the specified column in the current row as long. 3784 * The implementation class determines whether to throw an exception if the value of the specified column 3785 * in the current row is null, the specified column is not of the integer type. 3786 * 3787 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3788 * @returns { number } The value of the specified column as a long. 3789 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3790 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3791 * @throws { BusinessError } 14800000 - Inner error. 3792 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3793 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3794 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3795 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3796 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3797 * Possible causes: Insert failed or the updated data does not exist. 3798 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3799 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3800 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3801 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3802 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3803 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3804 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3805 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3806 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3807 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3808 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3809 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3810 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3811 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3812 * @crossplatform 3813 * @since arkts {'1.1':'12', '1.2':'20'} 3814 * @arkts 1.1&1.2 3815 */ 3816 getLong(columnIndex: number): number; 3817 3818 /** 3819 * Obtains the value of the specified column in the current row as double. 3820 * The implementation class determines whether to throw an exception if the value of the specified column 3821 * in the current row is null, the specified column is not of the double type. 3822 * 3823 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3824 * @returns { number } The value of the specified column as a double. 3825 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3826 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3827 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3828 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3829 * @since 9 3830 */ 3831 /** 3832 * Obtains the value of the specified column in the current row as double. 3833 * The implementation class determines whether to throw an exception if the value of the specified column 3834 * in the current row is null, the specified column is not of the double type. 3835 * 3836 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3837 * @returns { number } The value of the specified column as a double. 3838 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3839 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3840 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3841 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3842 * @crossplatform 3843 * @since 10 3844 */ 3845 /** 3846 * Obtains the value of the specified column in the current row as double. 3847 * The implementation class determines whether to throw an exception if the value of the specified column 3848 * in the current row is null, the specified column is not of the double type. 3849 * 3850 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3851 * @returns { number } The value of the specified column as a double. 3852 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3853 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3854 * @throws { BusinessError } 14800000 - Inner error. 3855 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3856 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3857 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3858 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3859 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3860 * Possible causes: Insert failed or the updated data does not exist. 3861 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3862 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3863 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3864 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3865 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3866 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3867 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3868 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3869 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3870 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3871 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3872 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3873 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3874 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3875 * @crossplatform 3876 * @since 12 3877 */ 3878 getDouble(columnIndex: number): number; 3879 3880 /** 3881 * Obtains the value of the specified column in the current row as an asset. 3882 * The implementation class determines whether to throw an exception if the value of the specified column 3883 * in the current row is null or the specified column is not of the Asset type. 3884 * 3885 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3886 * @returns { Asset } The value of the specified column as an asset. 3887 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3888 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3889 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3890 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3891 * @crossplatform 3892 * @since 10 3893 */ 3894 /** 3895 * Obtains the value of the specified column in the current row as an asset. 3896 * The implementation class determines whether to throw an exception if the value of the specified column 3897 * in the current row is null or the specified column is not of the Asset type. 3898 * 3899 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3900 * @returns { Asset } The value of the specified column as an asset. 3901 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3902 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3903 * @throws { BusinessError } 14800000 - Inner error. 3904 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3905 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3906 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3907 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3908 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3909 * Possible causes: Insert failed or the updated data does not exist. 3910 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3911 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3912 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3913 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3914 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3915 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3916 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3917 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3918 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3919 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3920 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3921 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3922 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3923 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3924 * @crossplatform 3925 * @since 12 3926 */ 3927 getAsset(columnIndex: number): Asset; 3928 3929 /** 3930 * Obtains the value of the specified column in the current row as assets. 3931 * The implementation class determines whether to throw an exception if the value of the specified column 3932 * in the current row is null or the specified column is not of the Assets type. 3933 * 3934 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3935 * @returns { Assets } The value of the specified column as assets. 3936 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3937 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3938 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3939 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3940 * @crossplatform 3941 * @since 10 3942 */ 3943 /** 3944 * Obtains the value of the specified column in the current row as assets. 3945 * The implementation class determines whether to throw an exception if the value of the specified column 3946 * in the current row is null or the specified column is not of the Assets type. 3947 * 3948 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3949 * @returns { Assets } The value of the specified column as assets. 3950 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3951 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3952 * @throws { BusinessError } 14800000 - Inner error. 3953 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3954 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3955 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3956 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3957 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3958 * Possible causes: Insert failed or the updated data does not exist. 3959 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3960 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3961 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3962 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3963 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3964 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3965 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3966 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3967 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3968 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3969 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3970 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3971 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3972 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3973 * @crossplatform 3974 * @since 12 3975 */ 3976 getAssets(columnIndex: number): Assets; 3977 3978 /** 3979 * Obtains the value of the specified column in the current row. 3980 * The implementation class determines whether to throw an exception if the value of the specified column 3981 * in the current row is null or the specified column is not of the Assets type. 3982 * 3983 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3984 * @returns { ValueType } The value of the specified column. 3985 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3986 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 3987 * @throws { BusinessError } 14800000 - Inner error. 3988 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 3989 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 3990 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 3991 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 3992 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3993 * Possible causes: Insert failed or the updated data does not exist. 3994 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3995 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3996 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3997 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3998 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3999 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4000 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4001 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4002 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4003 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4004 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4005 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4006 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4007 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4008 * @since 12 4009 */ 4010 /** 4011 * Obtains the value of the specified column in the current row. 4012 * The implementation class determines whether to throw an exception if the value of the specified column 4013 * in the current row is null or the specified column is not of the Assets type. 4014 * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, 4015 * the obtained value was null. 4016 * 4017 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 4018 * @returns { ValueType } The value of the specified column. 4019 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4020 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4021 * @throws { BusinessError } 14800000 - Inner error. 4022 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4023 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 4024 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 4025 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4026 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4027 * Possible causes: Insert failed or the updated data does not exist. 4028 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4029 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4030 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4031 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4032 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4033 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4034 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4035 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4036 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4037 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4038 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4039 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4040 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4041 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4042 * @since 14 4043 */ 4044 /** 4045 * Obtains the value of the specified column in the current row. 4046 * The implementation class determines whether to throw an exception if the value of the specified column 4047 * in the current row is null or the specified column is not of the Assets type. 4048 * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, 4049 * the obtained value was null. 4050 * 4051 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 4052 * @returns { ValueType } The value of the specified column. 4053 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4054 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4055 * @throws { BusinessError } 14800000 - Inner error. 4056 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4057 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 4058 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 4059 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4060 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4061 * Possible causes: Insert failed or the updated data does not exist. 4062 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4063 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4064 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4065 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4066 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4067 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4068 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4069 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4070 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4071 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4072 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4073 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4074 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4075 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4076 * @crossplatform 4077 * @since 20 4078 */ 4079 getValue(columnIndex: number): ValueType; 4080 4081 /** 4082 * Obtains the value of the specified column in the current row as a float array. 4083 * The implementation class determines whether to throw an exception if the value of the specified column 4084 * in the current row is null or the specified column is not of the float array type. 4085 * 4086 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 4087 * @returns { Float32Array } The value of the specified column as a float array. 4088 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4089 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4090 * @throws { BusinessError } 801 - The capability is not supported because the database is not a vector DB. 4091 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4092 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 4093 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4094 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4095 * Possible causes: Insert failed or the updated data does not exist. 4096 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4097 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4098 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4099 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4100 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4101 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4102 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4103 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4104 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4105 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4106 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4107 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4108 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4109 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4110 * @systemapi 4111 * @since 12 4112 */ 4113 getFloat32Array(columnIndex: number): Float32Array; 4114 4115 /** 4116 * Obtains the values of all columns in the specified row. 4117 * 4118 * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4119 * @throws { BusinessError } 14800000 - Inner error. 4120 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4121 * @crossplatform 4122 * @since 11 4123 */ 4124 /** 4125 * Obtains the values of all columns in the specified row. 4126 * 4127 * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4128 * @throws { BusinessError } 14800000 - Inner error. 4129 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4130 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 4131 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 4132 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4133 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4134 * Possible causes: Insert failed or the updated data does not exist. 4135 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4136 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4137 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4138 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4139 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4140 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4141 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4142 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4143 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4144 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4145 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4146 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4147 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4148 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4149 * @crossplatform 4150 * @since 12 4151 */ 4152 /** 4153 * Obtains the values of all columns in the specified row. 4154 * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, 4155 * the obtained value was null. 4156 * 4157 * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4158 * @throws { BusinessError } 14800000 - Inner error. 4159 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4160 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 4161 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 4162 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4163 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4164 * Possible causes: Insert failed or the updated data does not exist. 4165 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4166 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4167 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4168 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4169 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4170 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4171 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4172 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4173 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4174 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4175 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4176 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4177 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4178 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4179 * @crossplatform 4180 * @since 14 4181 */ 4182 getRow(): ValuesBucket; 4183 4184 /** 4185 * Obtains the values of all columns in the specified rows. 4186 * @param { number } maxCount - Indicates the maximum number of rows. 4187 * @param { number } position - Indicates the start position to obtain the values. 4188 * @returns { Promise<Array<ValuesBucket>> } Promise used to return the values obtained, 4189 * in an {@link Array<ValuesBucket>}. 4190 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4191 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4192 * @throws { BusinessError } 14800000 - Inner error. 4193 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4194 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 4195 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 4196 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4197 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4198 * Possible causes: Insert failed or the updated data does not exist. 4199 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4200 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4201 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4202 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4203 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4204 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4205 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4206 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4207 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4208 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4209 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4210 * @crossplatform 4211 * @since 18 4212 */ 4213 getRows(maxCount: number, position?: number): Promise<Array<ValuesBucket>>; 4214 4215 /** 4216 * Obtains the values of all columns in the specified row. 4217 * 4218 * @returns { sendableRelationalStore.ValuesBucket } Indicates the row of data 4219 * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. 4220 * @throws { BusinessError } 14800000 - Inner error. 4221 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4222 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 4223 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 4224 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4225 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4226 * Possible causes: Insert failed or the updated data does not exist. 4227 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4228 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4229 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4230 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4231 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4232 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4233 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4234 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4235 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4236 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4237 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4238 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4239 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4240 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4241 * @since 12 4242 */ 4243 getSendableRow(): sendableRelationalStore.ValuesBucket; 4244 4245 /** 4246 * Checks whether the value of the specified column in the current row is null. 4247 * 4248 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 4249 * @returns { boolean } True if the value of the specified column in the current row is null; 4250 * Returns false otherwise. 4251 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 4252 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4253 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4254 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4255 * @since 9 4256 */ 4257 /** 4258 * Checks whether the value of the specified column in the current row is null. 4259 * 4260 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 4261 * @returns { boolean } True if the value of the specified column in the current row is null; 4262 * Returns false otherwise. 4263 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 4264 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4265 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4266 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4267 * @crossplatform 4268 * @since 10 4269 */ 4270 /** 4271 * Checks whether the value of the specified column in the current row is null. 4272 * 4273 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 4274 * @returns { boolean } True if the value of the specified column in the current row is null; 4275 * Returns false otherwise. 4276 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4277 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4278 * @throws { BusinessError } 14800000 - Inner error. 4279 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4280 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 4281 * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. 4282 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4283 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4284 * Possible causes: Insert failed or the updated data does not exist. 4285 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4286 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4287 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4288 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4289 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4290 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4291 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4292 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4293 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4294 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4295 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4296 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4297 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4298 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4299 * @crossplatform 4300 * @since 12 4301 */ 4302 isColumnNull(columnIndex: number): boolean; 4303 4304 /** 4305 * Closes the result set. 4306 * Calling this method on the result set will release all of its resources and makes it ineffective. 4307 * 4308 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 4309 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4310 * @since 9 4311 */ 4312 /** 4313 * Closes the result set. 4314 * Calling this method on the result set will release all of its resources and makes it ineffective. 4315 * 4316 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 4317 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4318 * @crossplatform 4319 * @since 10 4320 */ 4321 /** 4322 * Closes the result set. 4323 * Calling this method on the result set will release all of its resources and makes it ineffective. 4324 * 4325 * @throws { BusinessError } 14800000 - Inner error. 4326 * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. 4327 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4328 * @crossplatform 4329 * @since 12 4330 */ 4331 close(): void; 4332 } 4333 4334 /** 4335 * Provides methods for managing the relational database (RDB). 4336 * This class provides methods for creating, querying, updating, and deleting RDBs. 4337 * 4338 * @interface RdbStore 4339 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4340 * @since 9 4341 */ 4342 /** 4343 * Provides methods for managing the relational database (RDB). 4344 * This class provides methods for creating, querying, updating, and deleting RDBs. 4345 * 4346 * @interface RdbStore 4347 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4348 * @crossplatform 4349 * @since arkts {'1.1':'10', '1.2':'20'} 4350 * @arkts 1.1&1.2 4351 */ 4352 interface RdbStore { 4353 /** 4354 * Set RdbStore version. The version number must be an integer greater than 0. 4355 * Obtains the RdbStore version. 4356 * 4357 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4358 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4359 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4360 * @since 10 4361 */ 4362 /** 4363 * Set RdbStore version. The version number must be an integer greater than 0. 4364 * Obtains the RdbStore version. 4365 * 4366 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4367 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4368 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4369 * @crossplatform 4370 * @since 10 4371 */ 4372 /** 4373 * Set RdbStore version. The version number must be an integer greater than 0. 4374 * Obtains the RdbStore version. 4375 * 4376 * @type { number } 4377 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4378 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4379 * @throws { BusinessError } 801 - Capability not supported. 4380 * @throws { BusinessError } 14800000 - Inner error. 4381 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4382 * @throws { BusinessError } 14800015 - The database does not respond. 4383 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4384 * Possible causes: Insert failed or the updated data does not exist. 4385 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4386 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4387 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4388 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4389 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4390 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4391 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4392 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4393 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4394 * @crossplatform 4395 * @since 12 4396 */ 4397 version: number; 4398 4399 /** 4400 * Set whether the database is rebuilt. 4401 * 4402 * @type {RebuildType} 4403 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4404 * @since 12 4405 */ 4406 rebuilt: RebuildType; 4407 4408 /** 4409 * Inserts a row of data into the target table. 4410 * 4411 * @param { string } table - Indicates the target table. 4412 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4413 * @param { AsyncCallback<number> } callback - The row ID if the operation is successful. returns -1 otherwise. 4414 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4415 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4416 * @throws { BusinessError } 14800000 - Inner error. 4417 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4418 * @since 9 4419 */ 4420 /** 4421 * Inserts a row of data into the target table. 4422 * 4423 * @param { string } table - Indicates the target table. 4424 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4425 * @param { AsyncCallback<number> } callback - The row ID if the operation is successful. returns -1 otherwise. 4426 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4427 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4428 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4429 * @throws { BusinessError } 14800000 - Inner error. 4430 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4431 * @crossplatform 4432 * @since 10 4433 */ 4434 /** 4435 * Inserts a row of data into the target table. 4436 * 4437 * @param { string } table - Indicates the target table. 4438 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4439 * @param { AsyncCallback<number> } callback - The row ID if the operation is successful. returns -1 otherwise. 4440 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4441 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4442 * @throws { BusinessError } 14800000 - Inner error. 4443 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4444 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4445 * @throws { BusinessError } 14800015 - The database does not respond. 4446 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4447 * Possible causes: Insert failed or the updated data does not exist. 4448 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4449 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4450 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4451 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4452 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4453 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4454 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4455 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4456 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4457 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4458 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4459 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4460 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4461 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4462 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4463 * @crossplatform 4464 * @since 12 4465 */ 4466 insert(table: string, values: ValuesBucket, callback: AsyncCallback<number>): void; 4467 4468 /** 4469 * Inserts a row of data into the target table. 4470 * 4471 * @param { string } table - Indicates the target table. 4472 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4473 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4474 * @param { AsyncCallback<number> } callback - The row ID if the operation is successful. returns -1 otherwise. 4475 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4476 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4477 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4478 * @throws { BusinessError } 14800000 - Inner error. 4479 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4480 * @crossplatform 4481 * @since 10 4482 */ 4483 /** 4484 * Inserts a row of data into the target table. 4485 * 4486 * @param { string } table - Indicates the target table. 4487 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4488 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4489 * @param { AsyncCallback<number> } callback - The row ID if the operation is successful. returns -1 otherwise. 4490 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4491 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4492 * @throws { BusinessError } 14800000 - Inner error. 4493 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4494 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4495 * @throws { BusinessError } 14800015 - The database does not respond. 4496 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4497 * Possible causes: Insert failed or the updated data does not exist. 4498 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4499 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4500 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4501 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4502 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4503 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4504 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4505 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4506 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4507 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4508 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4509 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4510 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4511 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4512 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4513 * @crossplatform 4514 * @since 12 4515 */ 4516 insert(table: string, values: ValuesBucket, conflict: ConflictResolution, callback: AsyncCallback<number>): void; 4517 4518 /** 4519 * Inserts a row of data into the target table. 4520 * 4521 * @param { string } table - Indicates the target table. 4522 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4523 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 4524 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4525 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4526 * @throws { BusinessError } 14800000 - Inner error. 4527 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4528 * @since 9 4529 */ 4530 /** 4531 * Inserts a row of data into the target table. 4532 * 4533 * @param { string } table - Indicates the target table. 4534 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4535 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 4536 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4537 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4538 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4539 * @throws { BusinessError } 14800000 - Inner error. 4540 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4541 * @crossplatform 4542 * @since 10 4543 */ 4544 /** 4545 * Inserts a row of data into the target table. 4546 * 4547 * @param { string } table - Indicates the target table. 4548 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4549 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 4550 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4551 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4552 * @throws { BusinessError } 14800000 - Inner error. 4553 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4554 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4555 * @throws { BusinessError } 14800015 - The database does not respond. 4556 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4557 * Possible causes: Insert failed or the updated data does not exist. 4558 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4559 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4560 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4561 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4562 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4563 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4564 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4565 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4566 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4567 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4568 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4569 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4570 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4571 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4572 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4573 * @crossplatform 4574 * @since 12 4575 */ 4576 insert(table: string, values: ValuesBucket): Promise<number>; 4577 4578 /** 4579 * Inserts a row of data into the target table. 4580 * 4581 * @param { string } table - Indicates the target table. 4582 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4583 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4584 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 4585 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4586 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4587 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4588 * @throws { BusinessError } 14800000 - Inner error. 4589 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4590 * @crossplatform 4591 * @since 10 4592 */ 4593 /** 4594 * Inserts a row of data into the target table. 4595 * 4596 * @param { string } table - Indicates the target table. 4597 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4598 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4599 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 4600 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4601 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4602 * @throws { BusinessError } 14800000 - Inner error. 4603 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4604 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4605 * @throws { BusinessError } 14800015 - The database does not respond. 4606 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4607 * Possible causes: Insert failed or the updated data does not exist. 4608 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4609 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4610 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4611 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4612 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4613 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4614 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4615 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4616 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4617 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4618 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4619 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4620 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4621 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4622 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4623 * @crossplatform 4624 * @since 12 4625 */ 4626 insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise<number>; 4627 4628 /** 4629 * Inserts a row of data into the target table with sync interface. 4630 * 4631 * @param { string } table - Indicates the target table. 4632 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4633 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4634 * @returns { number } The row ID if the operation is successful. return -1 otherwise. 4635 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4636 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4637 * @throws { BusinessError } 14800000 - Inner error. 4638 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4639 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4640 * @throws { BusinessError } 14800015 - The database does not respond. 4641 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4642 * Possible causes: Insert failed or the updated data does not exist. 4643 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4644 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4645 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4646 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4647 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4648 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4649 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4650 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4651 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4652 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4653 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4654 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4655 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4656 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4657 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4658 * @crossplatform 4659 * @since 12 4660 */ 4661 insertSync(table: string, values: ValuesBucket, conflict?: ConflictResolution): number; 4662 4663 /** 4664 * Inserts a row of data into the target table with sync interface. 4665 * 4666 * @param { string } table - Indicates the target table. 4667 * @param { sendableRelationalStore.ValuesBucket } values - Indicates the row of data 4668 * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. 4669 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4670 * @returns { number } The row ID if the operation is successful. return -1 otherwise. 4671 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4672 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4673 * @throws { BusinessError } 14800000 - Inner error. 4674 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4675 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4676 * @throws { BusinessError } 14800015 - The database does not respond. 4677 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4678 * Possible causes: Insert failed or the updated data does not exist. 4679 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4680 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4681 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4682 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4683 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4684 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4685 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4686 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4687 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4688 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4689 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4690 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4691 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4692 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4693 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4694 * @since 12 4695 */ 4696 insertSync(table: string, values: sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; 4697 4698 /** 4699 * Inserts a batch of data into the target table. 4700 * 4701 * @param { string } table - Indicates the target table. 4702 * @param { Array<ValuesBucket> } values - 4703 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4704 * @param { AsyncCallback<number> } callback - 4705 * The number of values that were inserted if the operation is successful. returns -1 otherwise. 4706 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4707 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4708 * @throws { BusinessError } 14800000 - Inner error. 4709 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4710 * @since 9 4711 */ 4712 /** 4713 * Inserts a batch of data into the target table. 4714 * 4715 * @param { string } table - Indicates the target table. 4716 * @param { Array<ValuesBucket> } values - 4717 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4718 * @param { AsyncCallback<number> } callback - 4719 * The number of values that were inserted if the operation is successful. returns -1 otherwise. 4720 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4721 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4722 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4723 * @throws { BusinessError } 14800000 - Inner error. 4724 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4725 * @crossplatform 4726 * @since 10 4727 */ 4728 /** 4729 * Inserts a batch of data into the target table. 4730 * 4731 * @param { string } table - Indicates the target table. 4732 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} 4733 * to be inserted into the table. 4734 * @param { AsyncCallback<number> } callback - 4735 * The number of values that were inserted if the operation is successful. returns -1 otherwise. 4736 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4737 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4738 * @throws { BusinessError } 14800000 - Inner error. 4739 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4740 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4741 * @throws { BusinessError } 14800015 - The database does not respond. 4742 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4743 * Possible causes: Insert failed or the updated data does not exist. 4744 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4745 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4746 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4747 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4748 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4749 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4750 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4751 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4752 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4753 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4754 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4755 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4756 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4757 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4758 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4759 * @crossplatform 4760 * @since arkts {'1.1':'12', '1.2':'20'} 4761 * @arkts 1.1&1.2 4762 */ 4763 batchInsert(table: string, values: Array<ValuesBucket>, callback: AsyncCallback<number>): void; 4764 4765 /** 4766 * Inserts a batch of data into the target table. 4767 * 4768 * @param { string } table - Indicates the target table. 4769 * @param { Array<ValuesBucket> } values - 4770 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4771 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. 4772 * returns -1 otherwise. 4773 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4774 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4775 * @throws { BusinessError } 14800000 - Inner error. 4776 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4777 * @since 9 4778 */ 4779 /** 4780 * Inserts a batch of data into the target table. 4781 * 4782 * @param { string } table - Indicates the target table. 4783 * @param { Array<ValuesBucket> } values - 4784 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4785 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. 4786 * returns -1 otherwise. 4787 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4788 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4789 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4790 * @throws { BusinessError } 14800000 - Inner error. 4791 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4792 * @crossplatform 4793 * @since 10 4794 */ 4795 /** 4796 * Inserts a batch of data into the target table. 4797 * 4798 * @param { string } table - Indicates the target table. 4799 * @param { Array<ValuesBucket> } values - 4800 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4801 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. 4802 * returns -1 otherwise. 4803 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4804 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4805 * @throws { BusinessError } 14800000 - Inner error. 4806 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4807 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4808 * @throws { BusinessError } 14800015 - The database does not respond. 4809 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4810 * Possible causes: Insert failed or the updated data does not exist. 4811 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4812 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4813 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4814 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4815 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4816 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4817 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4818 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4819 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4820 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4821 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4822 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4823 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4824 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4825 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4826 * @crossplatform 4827 * @since arkts {'1.1':'12', '1.2':'20'} 4828 * @arkts 1.1&1.2 4829 */ 4830 batchInsert(table: string, values: Array<ValuesBucket>): Promise<number>; 4831 4832 /** 4833 * Inserts a batch of data into the target table. 4834 * 4835 * @param { string } table - Indicates the target table. 4836 * @param { Array<ValuesBucket> } values - 4837 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4838 * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. 4839 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4840 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4841 * @throws { BusinessError } 14800000 - Inner error. 4842 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4843 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4844 * @throws { BusinessError } 14800015 - The database does not respond. 4845 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4846 * Possible causes: Insert failed or the updated data does not exist. 4847 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4848 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4849 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4850 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4851 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4852 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4853 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4854 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4855 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4856 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4857 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4858 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4859 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4860 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4861 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4862 * @crossplatform 4863 * @since arkts {'1.1':'12', '1.2':'20'} 4864 * @arkts 1.1&1.2 4865 */ 4866 batchInsertSync(table: string, values: Array<ValuesBucket>): number; 4867 4868 /** 4869 * Inserts a batch of data into the target table. 4870 * 4871 * @param { string } table - Indicates the target table. 4872 * @param { Array<ValuesBucket> } values - 4873 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4874 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4875 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. 4876 * returns -1 otherwise. 4877 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4878 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4879 * @throws { BusinessError } 14800000 - Inner error. 4880 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4881 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4882 * @throws { BusinessError } 14800015 - The database does not respond. 4883 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4884 * Possible causes: Insert failed or the updated data does not exist. 4885 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4886 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4887 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4888 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4889 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4890 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4891 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4892 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4893 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4894 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4895 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4896 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4897 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4898 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4899 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4900 * @crossplatform 4901 * @since 18 4902 */ 4903 batchInsertWithConflictResolution(table: string, values: Array<ValuesBucket>, conflict: ConflictResolution): Promise<number>; 4904 4905 /** 4906 * Inserts a batch of data into the target table. 4907 * 4908 * @param { string } table - Indicates the target table. 4909 * @param { Array<ValuesBucket> } values - 4910 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4911 * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. 4912 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4913 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4914 * @throws { BusinessError } 14800000 - Inner error. 4915 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4916 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4917 * @throws { BusinessError } 14800015 - The database does not respond. 4918 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4919 * Possible causes: Insert failed or the updated data does not exist. 4920 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4921 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4922 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4923 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4924 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4925 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4926 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4927 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4928 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4929 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4930 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4931 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4932 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4933 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4934 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4935 * @crossplatform 4936 * @since 18 4937 */ 4938 batchInsertWithConflictResolutionSync(table: string, values: Array<ValuesBucket>, conflict: ConflictResolution): number; 4939 4940 /** 4941 * Updates data in the database based on a specified instance object of RdbPredicates. 4942 * 4943 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4944 * The key-value pairs are associated with column names of the database table. 4945 * @param { RdbPredicates } predicates - 4946 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4947 * @param { AsyncCallback<number> } callback - The number of affected rows. 4948 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4949 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4950 * @throws { BusinessError } 14800000 - Inner error. 4951 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4952 * @since 9 4953 */ 4954 /** 4955 * Updates data in the database based on a specified instance object of RdbPredicates. 4956 * 4957 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4958 * The key-value pairs are associated with column names of the database table. 4959 * @param { RdbPredicates } predicates - 4960 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4961 * @param { AsyncCallback<number> } callback - The number of affected rows. 4962 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4963 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4964 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4965 * @throws { BusinessError } 14800000 - Inner error. 4966 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4967 * @crossplatform 4968 * @since 10 4969 */ 4970 /** 4971 * Updates data in the database based on a specified instance object of RdbPredicates. 4972 * 4973 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4974 * The key-value pairs are associated with column names of the database table. 4975 * @param { RdbPredicates } predicates - 4976 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4977 * @param { AsyncCallback<number> } callback - The number of affected rows. 4978 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4979 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 4980 * @throws { BusinessError } 14800000 - Inner error. 4981 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 4982 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 4983 * @throws { BusinessError } 14800015 - The database does not respond. 4984 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4985 * Possible causes: Insert failed or the updated data does not exist. 4986 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4987 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4988 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4989 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4990 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4991 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4992 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4993 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4994 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4995 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4996 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4997 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4998 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4999 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5000 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5001 * @crossplatform 5002 * @since 12 5003 */ 5004 update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback<number>): void; 5005 5006 /** 5007 * Updates data in the database based on a specified instance object of RdbPredicates. 5008 * 5009 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5010 * The key-value pairs are associated with column names of the database table. 5011 * @param { RdbPredicates } predicates - 5012 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 5013 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 5014 * @param { AsyncCallback<number> } callback - The number of affected rows. 5015 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5016 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5017 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5018 * @throws { BusinessError } 14800000 - Inner error. 5019 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5020 * @crossplatform 5021 * @since 10 5022 */ 5023 /** 5024 * Updates data in the database based on a specified instance object of RdbPredicates. 5025 * 5026 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5027 * The key-value pairs are associated with column names of the database table. 5028 * @param { RdbPredicates } predicates - 5029 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 5030 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 5031 * @param { AsyncCallback<number> } callback - The number of affected rows. 5032 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5033 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5034 * @throws { BusinessError } 14800000 - Inner error. 5035 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5036 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5037 * @throws { BusinessError } 14800015 - The database does not respond. 5038 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5039 * Possible causes: Insert failed or the updated data does not exist. 5040 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5041 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5042 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5043 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5044 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5045 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5046 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5047 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5048 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5049 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5050 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5051 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5052 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5053 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5054 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5055 * @crossplatform 5056 * @since 12 5057 */ 5058 update( 5059 values: ValuesBucket, 5060 predicates: RdbPredicates, 5061 conflict: ConflictResolution, 5062 callback: AsyncCallback<number> 5063 ): void; 5064 5065 /** 5066 * Updates data in the database based on a specified instance object of RdbPredicates. 5067 * 5068 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5069 * The key-value pairs are associated with column names of the database table. 5070 * @param { RdbPredicates } predicates - 5071 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 5072 * @returns { Promise<number> } The number of affected rows. 5073 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5074 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5075 * @throws { BusinessError } 14800000 - Inner error. 5076 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5077 * @since 9 5078 */ 5079 /** 5080 * Updates data in the database based on a specified instance object of RdbPredicates. 5081 * 5082 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5083 * The key-value pairs are associated with column names of the database table. 5084 * @param { RdbPredicates } predicates - 5085 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 5086 * @returns { Promise<number> } The number of affected rows. 5087 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5088 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5089 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5090 * @throws { BusinessError } 14800000 - Inner error. 5091 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5092 * @crossplatform 5093 * @since 10 5094 */ 5095 /** 5096 * Updates data in the database based on a specified instance object of RdbPredicates. 5097 * 5098 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5099 * The key-value pairs are associated with column names of the database table. 5100 * @param { RdbPredicates } predicates - 5101 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 5102 * @returns { Promise<number> } The number of affected rows. 5103 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5104 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5105 * @throws { BusinessError } 14800000 - Inner error. 5106 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5107 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5108 * @throws { BusinessError } 14800015 - The database does not respond. 5109 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5110 * Possible causes: Insert failed or the updated data does not exist. 5111 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5112 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5113 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5114 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5115 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5116 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5117 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5118 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5119 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5120 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5121 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5122 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5123 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5124 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5125 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5126 * @crossplatform 5127 * @since 12 5128 */ 5129 update(values: ValuesBucket, predicates: RdbPredicates): Promise<number>; 5130 5131 /** 5132 * Updates data in the database based on a specified instance object of RdbPredicates. 5133 * 5134 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5135 * The key-value pairs are associated with column names of the database table. 5136 * @param { RdbPredicates } predicates - 5137 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 5138 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 5139 * @returns { Promise<number> } The number of affected rows. 5140 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5141 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5142 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5143 * @throws { BusinessError } 14800000 - Inner error. 5144 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5145 * @crossplatform 5146 * @since 10 5147 */ 5148 /** 5149 * Updates data in the database based on a specified instance object of RdbPredicates. 5150 * 5151 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5152 * The key-value pairs are associated with column names of the database table. 5153 * @param { RdbPredicates } predicates - 5154 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 5155 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 5156 * @returns { Promise<number> } The number of affected rows. 5157 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5158 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5159 * @throws { BusinessError } 14800000 - Inner error. 5160 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5161 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5162 * @throws { BusinessError } 14800015 - The database does not respond. 5163 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5164 * Possible causes: Insert failed or the updated data does not exist. 5165 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5166 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5167 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5168 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5169 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5170 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5171 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5172 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5173 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5174 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5175 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5176 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5177 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5178 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5179 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5180 * @crossplatform 5181 * @since 12 5182 */ 5183 update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise<number>; 5184 5185 /** 5186 * Updates data in the database based on a specified instance object of RdbPredicates with sync interface. 5187 * 5188 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5189 * The key-value pairs are associated with column names of the database table. 5190 * @param { RdbPredicates } predicates - 5191 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 5192 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 5193 * @returns { number } The number of affected rows. 5194 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5195 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5196 * @throws { BusinessError } 14800000 - Inner error. 5197 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5198 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5199 * @throws { BusinessError } 14800015 - The database does not respond. 5200 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5201 * Possible causes: Insert failed or the updated data does not exist. 5202 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5203 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5204 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5205 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5206 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5207 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5208 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5209 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5210 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5211 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5212 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5213 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5214 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5215 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5216 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5217 * @crossplatform 5218 * @since 12 5219 */ 5220 updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number; 5221 5222 /** 5223 * Updates data in the database based on a specified instance object of RdbPredicates. 5224 * 5225 * @param { string } table - Indicates the target table. 5226 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5227 * The key-value pairs are associated with column names of the database table. 5228 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 5229 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 5230 * @param { AsyncCallback<number> } callback - The number of affected rows. 5231 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5232 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5233 * @throws { BusinessError } 14800000 - Inner error. 5234 * @throws { BusinessError } 202 - Permission verification failed, 5235 * application which is not a system application uses system API. 5236 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5237 * @systemapi 5238 * @StageModelOnly 5239 * @since 9 5240 */ 5241 /** 5242 * Updates data in the database based on a specified instance object of RdbPredicates. 5243 * 5244 * @param { string } table - Indicates the target table. 5245 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5246 * The key-value pairs are associated with column names of the database table. 5247 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 5248 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 5249 * @param { AsyncCallback<number> } callback - The number of affected rows. 5250 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5251 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5252 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5253 * @throws { BusinessError } 14800000 - Inner error. 5254 * @throws { BusinessError } 202 - Permission verification failed, 5255 * application which is not a system application uses system API. 5256 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5257 * @systemapi 5258 * @StageModelOnly 5259 * @since 10 5260 */ 5261 /** 5262 * Updates data in the database based on a specified instance object of RdbPredicates. 5263 * 5264 * @param { string } table - Indicates the target table. 5265 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5266 * The key-value pairs are associated with column names of the database table. 5267 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 5268 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 5269 * @param { AsyncCallback<number> } callback - The number of affected rows. 5270 * @throws { BusinessError } 202 - Permission verification failed, 5271 * application which is not a system application uses system API. 5272 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5273 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5274 * @throws { BusinessError } 14800000 - Inner error. 5275 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5276 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5277 * @throws { BusinessError } 14800015 - The database does not respond. 5278 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5279 * Possible causes: Insert failed or the updated data does not exist. 5280 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5281 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5282 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5283 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5284 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5285 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5286 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5287 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5288 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5289 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5290 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5291 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5292 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5293 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5294 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5295 * @systemapi 5296 * @StageModelOnly 5297 * @since 12 5298 */ 5299 update( 5300 table: string, 5301 values: ValuesBucket, 5302 predicates: dataSharePredicates.DataSharePredicates, 5303 callback: AsyncCallback<number> 5304 ): void; 5305 5306 /** 5307 * Updates data in the database based on a specified instance object of RdbPredicates. 5308 * 5309 * @param { string } table - Indicates the target table. 5310 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5311 * The key-value pairs are associated with column names of the database table. 5312 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 5313 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 5314 * @returns { Promise<number> } The number of affected rows. 5315 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5316 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5317 * @throws { BusinessError } 14800000 - Inner error. 5318 * @throws { BusinessError } 202 - Permission verification failed, 5319 * application which is not a system application uses system API. 5320 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5321 * @systemapi 5322 * @StageModelOnly 5323 * @since 9 5324 */ 5325 /** 5326 * Updates data in the database based on a specified instance object of RdbPredicates. 5327 * 5328 * @param { string } table - Indicates the target table. 5329 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5330 * The key-value pairs are associated with column names of the database table. 5331 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 5332 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 5333 * @returns { Promise<number> } The number of affected rows. 5334 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5335 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5336 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5337 * @throws { BusinessError } 14800000 - Inner error. 5338 * @throws { BusinessError } 202 - Permission verification failed, 5339 * application which is not a system application uses system API. 5340 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5341 * @systemapi 5342 * @StageModelOnly 5343 * @since 10 5344 */ 5345 /** 5346 * Updates data in the database based on a specified instance object of RdbPredicates. 5347 * 5348 * @param { string } table - Indicates the target table. 5349 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 5350 * The key-value pairs are associated with column names of the database table. 5351 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 5352 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 5353 * @returns { Promise<number> } The number of affected rows. 5354 * @throws { BusinessError } 202 - Permission verification failed, 5355 * application which is not a system application uses system API. 5356 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5357 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5358 * @throws { BusinessError } 14800000 - Inner error. 5359 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5360 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5361 * @throws { BusinessError } 14800015 - The database does not respond. 5362 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5363 * Possible causes: Insert failed or the updated data does not exist. 5364 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5365 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5366 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5367 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5368 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5369 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5370 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5371 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5372 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5373 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5374 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5375 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5376 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5377 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5378 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5379 * @systemapi 5380 * @StageModelOnly 5381 * @since 12 5382 */ 5383 update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise<number>; 5384 5385 /** 5386 * Deletes data from the database based on a specified instance object of RdbPredicates. 5387 * 5388 * @param { RdbPredicates } predicates - 5389 * The specified delete condition by the instance object of {@link RdbPredicates}. 5390 * @param { AsyncCallback<number> } callback - The number of affected rows. 5391 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5392 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5393 * @throws { BusinessError } 14800000 - Inner error. 5394 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5395 * @since 9 5396 */ 5397 /** 5398 * Deletes data from the database based on a specified instance object of RdbPredicates. 5399 * 5400 * @param { RdbPredicates } predicates - 5401 * The specified delete condition by the instance object of {@link RdbPredicates}. 5402 * @param { AsyncCallback<number> } callback - The number of affected rows. 5403 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5404 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5405 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5406 * @throws { BusinessError } 14800000 - Inner error. 5407 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5408 * @crossplatform 5409 * @since 10 5410 */ 5411 /** 5412 * Deletes data from the database based on a specified instance object of RdbPredicates. 5413 * 5414 * @param { RdbPredicates } predicates - 5415 * The specified delete condition by the instance object of {@link RdbPredicates}. 5416 * @param { AsyncCallback<number> } callback - The number of affected rows. 5417 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5418 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5419 * @throws { BusinessError } 14800000 - Inner error. 5420 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5421 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5422 * @throws { BusinessError } 14800015 - The database does not respond. 5423 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5424 * Possible causes: Insert failed or the updated data does not exist. 5425 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5426 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5427 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5428 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5429 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5430 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5431 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5432 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5433 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5434 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5435 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5436 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5437 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5438 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5439 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5440 * @crossplatform 5441 * @since arkts {'1.1':'12', '1.2':'20'} 5442 * @arkts 1.1&1.2 5443 */ 5444 delete(predicates: RdbPredicates, callback: AsyncCallback<number>): void; 5445 5446 /** 5447 * Deletes data from the database based on a specified instance object of RdbPredicates. 5448 * 5449 * @param { RdbPredicates } predicates - 5450 * The specified delete condition by the instance object of {@link RdbPredicates}. 5451 * @returns { Promise<number> } The number of affected rows. 5452 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5453 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5454 * @throws { BusinessError } 14800000 - Inner error. 5455 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5456 * @since 9 5457 */ 5458 /** 5459 * Deletes data from the database based on a specified instance object of RdbPredicates. 5460 * 5461 * @param { RdbPredicates } predicates - 5462 * The specified delete condition by the instance object of {@link RdbPredicates}. 5463 * @returns { Promise<number> } return the number of affected rows. 5464 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5465 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5466 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5467 * @throws { BusinessError } 14800000 - Inner error. 5468 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5469 * @crossplatform 5470 * @since 10 5471 */ 5472 /** 5473 * Deletes data from the database based on a specified instance object of RdbPredicates. 5474 * 5475 * @param { RdbPredicates } predicates - 5476 * The specified delete condition by the instance object of {@link RdbPredicates}. 5477 * @returns { Promise<number> } return the number of affected rows. 5478 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5479 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5480 * @throws { BusinessError } 14800000 - Inner error. 5481 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5482 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5483 * @throws { BusinessError } 14800015 - The database does not respond. 5484 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5485 * Possible causes: Insert failed or the updated data does not exist. 5486 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5487 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5488 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5489 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5490 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5491 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5492 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5493 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5494 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5495 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5496 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5497 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5498 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5499 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5500 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5501 * @crossplatform 5502 * @since arkts {'1.1':'12', '1.2':'20'} 5503 * @arkts 1.1&1.2 5504 */ 5505 delete(predicates: RdbPredicates): Promise<number>; 5506 5507 /** 5508 * Deletes data from the database based on a specified instance object of RdbPredicates with sync interface. 5509 * 5510 * @param { RdbPredicates } predicates - 5511 * The specified delete condition by the instance object of {@link RdbPredicates}. 5512 * @returns { number } return the number of rows deleted. 5513 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5514 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5515 * @throws { BusinessError } 14800000 - Inner error. 5516 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5517 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5518 * @throws { BusinessError } 14800015 - The database does not respond. 5519 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5520 * Possible causes: Insert failed or the updated data does not exist. 5521 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5522 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5523 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5524 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5525 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5526 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5527 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5528 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5529 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5530 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5531 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5532 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5533 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5534 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5535 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5536 * @crossplatform 5537 * @since arkts {'1.1':'12', '1.2':'20'} 5538 * @arkts 1.1&1.2 5539 */ 5540 deleteSync(predicates: RdbPredicates): number; 5541 /** 5542 * Deletes data from the database based on a specified instance object of RdbPredicates. 5543 * 5544 * @param { string } table - Indicates the target table. 5545 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified delete condition by 5546 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 5547 * @param { AsyncCallback<number> } callback - The number of affected rows. 5548 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5549 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5550 * @throws { BusinessError } 14800000 - Inner error. 5551 * @throws { BusinessError } 202 - Permission verification failed, 5552 * application which is not a system application uses system API. 5553 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5554 * @systemapi 5555 * @StageModelOnly 5556 * @since 9 5557 */ 5558 /** 5559 * Deletes data from the database based on a specified instance object of RdbPredicates. 5560 * 5561 * @param { string } table - Indicates the target table. 5562 * @param { dataSharePredicates.DataSharePredicates } predicates - 5563 * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5564 * @param { AsyncCallback<number> } callback - The number of affected rows. 5565 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5566 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5567 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5568 * @throws { BusinessError } 14800000 - Inner error. 5569 * @throws { BusinessError } 202 - Permission verification failed, 5570 * application which is not a system application uses system API. 5571 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5572 * @systemapi 5573 * @StageModelOnly 5574 * @since 10 5575 */ 5576 /** 5577 * Deletes data from the database based on a specified instance object of RdbPredicates. 5578 * 5579 * @param { string } table - Indicates the target table. 5580 * @param { dataSharePredicates.DataSharePredicates } predicates - 5581 * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5582 * @param { AsyncCallback<number> } callback - The number of affected rows. 5583 * @throws { BusinessError } 202 - Permission verification failed, 5584 * application which is not a system application uses system API. 5585 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5586 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5587 * @throws { BusinessError } 14800000 - Inner error. 5588 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5589 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5590 * @throws { BusinessError } 14800015 - The database does not respond. 5591 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5592 * Possible causes: Insert failed or the updated data does not exist. 5593 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5594 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5595 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5596 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5597 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5598 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5599 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5600 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5601 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5602 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5603 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5604 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5605 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5606 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5607 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5608 * @systemapi 5609 * @StageModelOnly 5610 * @since arkts {'1.1':'12', '1.2':'20'} 5611 * @arkts 1.1&1.2 5612 */ 5613 delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<number>): void; 5614 5615 /** 5616 * Deletes data from the database based on a specified instance object of RdbPredicates. 5617 * 5618 * @param { string } table - Indicates the target table. 5619 * @param { dataSharePredicates.DataSharePredicates } predicates - 5620 * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5621 * @returns { Promise<number> } The number of affected rows. 5622 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5623 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5624 * @throws { BusinessError } 14800000 - Inner error. 5625 * @throws { BusinessError } 202 - Permission verification failed, 5626 * application which is not a system application uses system API. 5627 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5628 * @systemapi 5629 * @StageModelOnly 5630 * @since 9 5631 */ 5632 /** 5633 * Deletes data from the database based on a specified instance object of RdbPredicates. 5634 * 5635 * @param { string } table - Indicates the target table. 5636 * @param { dataSharePredicates.DataSharePredicates } predicates - 5637 * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5638 * @returns { Promise<number> } The number of affected rows. 5639 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5640 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5641 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5642 * @throws { BusinessError } 14800000 - Inner error. 5643 * @throws { BusinessError } 202 - Permission verification failed, 5644 * application which is not a system application uses system API. 5645 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5646 * @systemapi 5647 * @StageModelOnly 5648 * @since 10 5649 */ 5650 /** 5651 * Deletes data from the database based on a specified instance object of RdbPredicates. 5652 * 5653 * @param { string } table - Indicates the target table. 5654 * @param { dataSharePredicates.DataSharePredicates } predicates - 5655 * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5656 * @returns { Promise<number> } The number of affected rows. 5657 * @throws { BusinessError } 202 - Permission verification failed, 5658 * application which is not a system application uses system API. 5659 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5660 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5661 * @throws { BusinessError } 14800000 - Inner error. 5662 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 5663 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5664 * @throws { BusinessError } 14800015 - The database does not respond. 5665 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5666 * Possible causes: Insert failed or the updated data does not exist. 5667 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5668 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5669 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5670 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5671 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5672 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5673 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5674 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5675 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5676 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5677 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5678 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5679 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5680 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5681 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5682 * @systemapi 5683 * @StageModelOnly 5684 * @since arkts {'1.1':'12', '1.2':'20'} 5685 * @arkts 1.1&1.2 5686 */ 5687 delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise<number>; 5688 5689 /** 5690 * Queries data in the database based on specified conditions. 5691 * 5692 * @param { RdbPredicates } predicates - 5693 * The specified query condition by the instance object of {@link RdbPredicates}. 5694 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5695 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5696 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5697 * @throws { BusinessError } 14800000 - Inner error. 5698 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5699 * @crossplatform 5700 * @since 10 5701 */ 5702 /** 5703 * Queries data in the database based on specified conditions. 5704 * 5705 * @param { RdbPredicates } predicates - 5706 * The specified query condition by the instance object of {@link RdbPredicates}. 5707 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5708 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5709 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5710 * @throws { BusinessError } 14800000 - Inner error. 5711 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5712 * @throws { BusinessError } 14800015 - The database does not respond. 5713 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5714 * @crossplatform 5715 * @since 12 5716 */ 5717 query(predicates: RdbPredicates, callback: AsyncCallback<ResultSet>): void; 5718 5719 /** 5720 * Queries data in the database based on specified conditions. 5721 * 5722 * @param { RdbPredicates } predicates - 5723 * The specified query condition by the instance object of {@link RdbPredicates}. 5724 * @param { Array<string> } columns - 5725 * The columns to query. If the value is empty array, the query applies to all columns. 5726 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5727 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5728 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5729 * @throws { BusinessError } 14800000 - Inner error. 5730 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5731 * @since 9 5732 */ 5733 /** 5734 * Queries data in the database based on specified conditions. 5735 * 5736 * @param { RdbPredicates } predicates - 5737 * The specified query condition by the instance object of {@link RdbPredicates}. 5738 * @param { Array<string> } columns - 5739 * The columns to query. If the value is empty array, the query applies to all columns. 5740 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5741 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5742 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5743 * @throws { BusinessError } 14800000 - Inner error. 5744 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5745 * @crossplatform 5746 * @since 10 5747 */ 5748 /** 5749 * Queries data in the database based on specified conditions. 5750 * 5751 * @param { RdbPredicates } predicates - 5752 * The specified query condition by the instance object of {@link RdbPredicates}. 5753 * @param { Array<string> } columns - 5754 * The columns to query. If the value is empty array, the query applies to all columns. 5755 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5756 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5757 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5758 * @throws { BusinessError } 14800000 - Inner error. 5759 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5760 * @throws { BusinessError } 14800015 - The database does not respond. 5761 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5762 * @crossplatform 5763 * @since 12 5764 */ 5765 query(predicates: RdbPredicates, columns: Array<string>, callback: AsyncCallback<ResultSet>): void; 5766 5767 /** 5768 * Queries data in the database based on specified conditions. 5769 * 5770 * @param { RdbPredicates } predicates - 5771 * The specified query condition by the instance object of {@link RdbPredicates}. 5772 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 5773 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5774 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5775 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5776 * @throws { BusinessError } 14800000 - Inner error. 5777 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5778 * @since 9 5779 */ 5780 /** 5781 * Queries data in the database based on specified conditions. 5782 * 5783 * @param { RdbPredicates } predicates - 5784 * The specified query condition by the instance object of {@link RdbPredicates}. 5785 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 5786 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5787 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5788 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5789 * @throws { BusinessError } 14800000 - Inner error. 5790 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5791 * @crossplatform 5792 * @since 10 5793 */ 5794 /** 5795 * Queries data in the database based on specified conditions. 5796 * 5797 * @param { RdbPredicates } predicates - 5798 * The specified query condition by the instance object of {@link RdbPredicates}. 5799 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 5800 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5801 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5802 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5803 * @throws { BusinessError } 14800000 - Inner error. 5804 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5805 * @throws { BusinessError } 14800015 - The database does not respond. 5806 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5807 * @crossplatform 5808 * @since 12 5809 */ 5810 query(predicates: RdbPredicates, columns?: Array<string>): Promise<ResultSet>; 5811 5812 /** 5813 * Queries data in the database based on specified conditions. 5814 * 5815 * @param { string } table - Indicates the target table. 5816 * @param { dataSharePredicates.DataSharePredicates } predicates - 5817 * The specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5818 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5819 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5820 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5821 * @throws { BusinessError } 14800000 - Inner error. 5822 * @throws { BusinessError } 202 - Permission verification failed, 5823 * application which is not a system application uses system API. 5824 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5825 * @systemapi 5826 * @StageModelOnly 5827 * @since 10 5828 */ 5829 /** 5830 * Queries data in the database based on specified conditions. 5831 * 5832 * @param { string } table - Indicates the target table. 5833 * @param { dataSharePredicates.DataSharePredicates } predicates - 5834 * The specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5835 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5836 * @throws { BusinessError } 202 - Permission verification failed, 5837 * application which is not a system application uses system API. 5838 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5839 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5840 * @throws { BusinessError } 14800000 - Inner error. 5841 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5842 * @throws { BusinessError } 14800015 - The database does not respond. 5843 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5844 * @systemapi 5845 * @StageModelOnly 5846 * @since 12 5847 */ 5848 query(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<ResultSet>): void; 5849 5850 /** 5851 * Queries data in the database based on specified conditions. 5852 * 5853 * @param { string } table - Indicates the target table. 5854 * @param { dataSharePredicates.DataSharePredicates } predicates - 5855 * The specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5856 * @param { Array<string> } columns - 5857 * The columns to query. If the value is empty array, the query applies to all columns. 5858 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5859 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5860 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5861 * @throws { BusinessError } 14800000 - Inner error. 5862 * @throws { BusinessError } 202 - Permission verification failed, 5863 * application which is not a system application uses system API. 5864 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5865 * @systemapi 5866 * @StageModelOnly 5867 * @since 9 5868 */ 5869 /** 5870 * Queries data in the database based on specified conditions. 5871 * 5872 * @param { string } table - Indicates the target table. 5873 * @param { dataSharePredicates.DataSharePredicates } predicates - 5874 * The specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5875 * @param { Array<string> } columns - 5876 * The columns to query. If the value is empty array, the query applies to all columns. 5877 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5878 * @throws { BusinessError } 202 - Permission verification failed, 5879 * application which is not a system application uses system API. 5880 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5881 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5882 * @throws { BusinessError } 14800000 - Inner error. 5883 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5884 * @throws { BusinessError } 14800015 - The database does not respond. 5885 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5886 * @systemapi 5887 * @StageModelOnly 5888 * @since 12 5889 */ 5890 query( 5891 table: string, 5892 predicates: dataSharePredicates.DataSharePredicates, 5893 columns: Array<string>, 5894 callback: AsyncCallback<ResultSet> 5895 ): void; 5896 5897 /** 5898 * Queries data in the database based on specified conditions. 5899 * 5900 * @param { string } table - Indicates the target table. 5901 * @param { dataSharePredicates.DataSharePredicates } predicates - 5902 * The specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5903 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 5904 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5905 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5906 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5907 * @throws { BusinessError } 14800000 - Inner error. 5908 * @throws { BusinessError } 202 - Permission verification failed, 5909 * application which is not a system application uses system API. 5910 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5911 * @systemapi 5912 * @StageModelOnly 5913 * @since 9 5914 */ 5915 /** 5916 * Queries data in the database based on specified conditions. 5917 * 5918 * @param { string } table - Indicates the target table. 5919 * @param { dataSharePredicates.DataSharePredicates } predicates - 5920 * The specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. 5921 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 5922 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5923 * @throws { BusinessError } 202 - Permission verification failed, 5924 * application which is not a system application uses system API. 5925 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5926 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5927 * @throws { BusinessError } 14800000 - Inner error. 5928 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5929 * @throws { BusinessError } 14800015 - The database does not respond. 5930 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5931 * @systemapi 5932 * @StageModelOnly 5933 * @since 12 5934 */ 5935 query( 5936 table: string, 5937 predicates: dataSharePredicates.DataSharePredicates, 5938 columns?: Array<string> 5939 ): Promise<ResultSet>; 5940 5941 /** 5942 * Queries data in the database based on specified conditions with sync function. 5943 * 5944 * @param { RdbPredicates } predicates - 5945 * The specified query condition by the instance object of {@link RdbPredicates}. 5946 * @param { Array<string> } columns - 5947 * The columns to query. If the value is empty array, the query applies to all columns. 5948 * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. 5949 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5950 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5951 * @throws { BusinessError } 14800000 - Inner error. 5952 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5953 * @throws { BusinessError } 14800015 - The database does not respond. 5954 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5955 * @crossplatform 5956 * @since 12 5957 */ 5958 querySync(predicates: RdbPredicates, columns?: Array<string>): ResultSet; 5959 5960 /** 5961 * Queries data in the database based on SQL statement. 5962 * 5963 * @param { string } sql - Indicates the SQL statement to execute. 5964 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5965 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5966 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5967 * @throws { BusinessError } 14800000 - Inner error. 5968 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5969 * @crossplatform 5970 * @since 10 5971 */ 5972 /** 5973 * Queries data in the database based on SQL statement. 5974 * 5975 * @param { string } sql - Indicates the SQL statement to execute. 5976 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5977 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5978 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5979 * @throws { BusinessError } 14800000 - Inner error. 5980 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 5981 * @throws { BusinessError } 14800015 - The database does not respond. 5982 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5983 * @crossplatform 5984 * @since 12 5985 */ 5986 querySql(sql: string, callback: AsyncCallback<ResultSet>): void; 5987 5988 /** 5989 * Queries data in the database based on SQL statement. 5990 * 5991 * @param { string } sql - Indicates the SQL statement to execute. 5992 * @param { Array<ValueType> } bindArgs - 5993 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5994 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5995 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5996 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 5997 * @throws { BusinessError } 14800000 - Inner error. 5998 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5999 * @since 9 6000 */ 6001 /** 6002 * Queries data in the database based on SQL statement. 6003 * 6004 * @param { string } sql - Indicates the SQL statement to execute. 6005 * @param { Array<ValueType> } bindArgs - 6006 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6007 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 6008 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6009 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6010 * @throws { BusinessError } 14800000 - Inner error. 6011 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6012 * @crossplatform 6013 * @since 10 6014 */ 6015 /** 6016 * Queries data in the database based on SQL statement. 6017 * 6018 * @param { string } sql - Indicates the SQL statement to execute. 6019 * @param { Array<ValueType> } bindArgs - 6020 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6021 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 6022 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6023 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6024 * @throws { BusinessError } 14800000 - Inner error. 6025 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6026 * @throws { BusinessError } 14800015 - The database does not respond. 6027 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6028 * @crossplatform 6029 * @since 12 6030 */ 6031 querySql(sql: string, bindArgs: Array<ValueType>, callback: AsyncCallback<ResultSet>): void; 6032 6033 /** 6034 * Queries data in the database based on SQL statement. 6035 * 6036 * @param { string } sql - Indicates the SQL statement to execute. 6037 * @param { Array<ValueType> } bindArgs - 6038 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6039 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 6040 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6041 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6042 * @throws { BusinessError } 14800000 - Inner error. 6043 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6044 * @since 9 6045 */ 6046 /** 6047 * Queries data in the database based on SQL statement. 6048 * 6049 * @param { string } sql - Indicates the SQL statement to execute. 6050 * @param { Array<ValueType> } bindArgs - 6051 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6052 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 6053 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6054 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6055 * @throws { BusinessError } 14800000 - Inner error. 6056 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6057 * @crossplatform 6058 * @since 10 6059 */ 6060 /** 6061 * Queries data in the database based on SQL statement. 6062 * 6063 * @param { string } sql - Indicates the SQL statement to execute. 6064 * @param { Array<ValueType> } bindArgs - 6065 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6066 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 6067 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6068 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6069 * @throws { BusinessError } 14800000 - Inner error. 6070 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6071 * @throws { BusinessError } 14800015 - The database does not respond. 6072 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6073 * @crossplatform 6074 * @since 12 6075 */ 6076 querySql(sql: string, bindArgs?: Array<ValueType>): Promise<ResultSet>; 6077 6078 /** 6079 * Queries data in the database based on SQL statement with sync interface. 6080 * 6081 * @param { string } sql - Indicates the SQL statement to execute. 6082 * @param { Array<ValueType> } bindArgs - 6083 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6084 * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. 6085 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6086 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6087 * @throws { BusinessError } 14800000 - Inner error. 6088 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6089 * @throws { BusinessError } 14800015 - The database does not respond. 6090 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6091 * @crossplatform 6092 * @since arkts {'1.1':'12', '1.2':'20'} 6093 * @arkts 1.1&1.2 6094 */ 6095 querySqlSync(sql: string, bindArgs?: Array<ValueType>): ResultSet; 6096 6097 /** 6098 * Obtains the modify time of rows corresponding to the primary keys. 6099 * 6100 * @param { string } table - Indicates the name of the table to check. 6101 * @param { string } columnName - Indicates the name of the column to check. 6102 * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. 6103 * @returns { Promise<ModifyTime> } - 6104 * The promise returned by the function. ModifyTime indicates the modify time of current row. 6105 * If this table does not support cloud, the {@link ModifyTime} will be empty. 6106 * @throws { BusinessError } 801 - Capability not supported. 6107 * @throws { BusinessError } 14800000 - Inner error. 6108 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6109 * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. 6110 * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. 6111 * 5. The PRIKey must be number or string. 6112 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6113 * @since 10 6114 */ 6115 /** 6116 * Obtains the modify time of rows corresponding to the primary keys. 6117 * 6118 * @param { string } table - Indicates the name of the table to check. 6119 * @param { string } columnName - Indicates the name of the column to check. 6120 * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. 6121 * @returns { Promise<ModifyTime> } - 6122 * The promise returned by the function. ModifyTime indicates the modify time of current row. 6123 * If this table does not support cloud, the {@link ModifyTime} will be empty. 6124 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6125 * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. 6126 * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. 6127 * 5. The PRIKey must be number or string. 6128 * @throws { BusinessError } 801 - Capability not supported. 6129 * @throws { BusinessError } 14800000 - Inner error. 6130 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6131 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6132 * @throws { BusinessError } 14800015 - The database does not respond. 6133 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6134 * Possible causes: Insert failed or the updated data does not exist. 6135 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6136 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6137 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6138 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6139 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6140 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6141 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6142 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6143 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6144 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6145 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6146 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6147 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6148 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6149 * @since 12 6150 */ 6151 getModifyTime(table: string, columnName: string, primaryKeys: PRIKeyType[]): Promise<ModifyTime>; 6152 6153 /** 6154 * Obtains the modify time of rows corresponding to the primary keys. 6155 * 6156 * @param { string } table - Indicates the name of the table to check. 6157 * @param { string } columnName - Indicates the name of the column to check. 6158 * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. 6159 * @param { AsyncCallback<ModifyTime> } callback - 6160 * The callback of getModifyTime. ModifyTime indicates the modify time of current row. 6161 * If this table does not support cloud, the {@link ModifyTime} will be empty. 6162 * @throws { BusinessError } 801 - Capability not supported. 6163 * @throws { BusinessError } 14800000 - Inner error. 6164 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6165 * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. 6166 * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. 6167 * 5. The PRIKey must be number or string. 6168 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6169 * @since 10 6170 */ 6171 /** 6172 * Obtains the modify time of rows corresponding to the primary keys. 6173 * 6174 * @param { string } table - Indicates the name of the table to check. 6175 * @param { string } columnName - Indicates the name of the column to check. 6176 * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. 6177 * @param { AsyncCallback<ModifyTime> } callback - 6178 * The callback of getModifyTime. ModifyTime indicates the modify time of current row. 6179 * If this table does not support cloud, the {@link ModifyTime} will be empty. 6180 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6181 * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. 6182 * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. 6183 * 5. The PRIKey must be number or string. 6184 * @throws { BusinessError } 801 - Capability not supported. 6185 * @throws { BusinessError } 14800000 - Inner error. 6186 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6187 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6188 * @throws { BusinessError } 14800015 - The database does not respond. 6189 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6190 * Possible causes: Insert failed or the updated data does not exist. 6191 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6192 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6193 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6194 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6195 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6196 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6197 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6198 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6199 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6200 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6201 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6202 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6203 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6204 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6205 * @since 12 6206 */ 6207 getModifyTime( 6208 table: string, 6209 columnName: string, 6210 primaryKeys: PRIKeyType[], 6211 callback: AsyncCallback<ModifyTime> 6212 ): void; 6213 6214 /** 6215 * Cleans the dirty data, which is the data deleted in the cloud. 6216 * 6217 * Data with a cursor smaller than the specified cursor will be cleaned up. 6218 * 6219 * @param { string } table - Indicates the name of the table to check. 6220 * @param { number } cursor - Indicates the position of the data to be cleaned up. 6221 * @param { AsyncCallback<void> } callback - Indicates the callback invoked to return the result. 6222 * @throws { BusinessError } 801 - Capability not supported. 6223 * @throws { BusinessError } 14800000 - Inner error. 6224 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6225 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6226 * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. 6227 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6228 * @since 11 6229 */ 6230 /** 6231 * Cleans the dirty data, which is the data deleted in the cloud. 6232 * 6233 * Data with a cursor smaller than the specified cursor will be cleaned up. 6234 * 6235 * @param { string } table - Indicates the name of the table to check. 6236 * @param { number } cursor - Indicates the position of the data to be cleaned up. 6237 * @param { AsyncCallback<void> } callback - Indicates the callback invoked to return the result. 6238 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6239 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6240 * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. 6241 * @throws { BusinessError } 801 - Capability not supported. 6242 * @throws { BusinessError } 14800000 - Inner error. 6243 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6244 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6245 * @throws { BusinessError } 14800015 - The database does not respond. 6246 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6247 * Possible causes: Insert failed or the updated data does not exist. 6248 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6249 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6250 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6251 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6252 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6253 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6254 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6255 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6256 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6257 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6258 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6259 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6260 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6261 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6262 * @since 12 6263 */ 6264 cleanDirtyData(table: string, cursor: number, callback: AsyncCallback<void>): void; 6265 6266 /** 6267 * Cleans all dirty data deleted in the cloud. 6268 * 6269 * @param { string } table - Indicates the name of the table to check. 6270 * @param { AsyncCallback<void> } callback - The callback of clean. 6271 * @throws { BusinessError } 801 - Capability not supported. 6272 * @throws { BusinessError } 14800000 - Inner error. 6273 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6274 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6275 * 3. The tablesNames must be not empty string. 6276 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6277 * @since 11 6278 */ 6279 /** 6280 * Cleans all dirty data deleted in the cloud. 6281 * 6282 * @param { string } table - Indicates the name of the table to check. 6283 * @param { AsyncCallback<void> } callback - The callback of clean. 6284 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6285 * 1. Need 1 - 3 parameter(s). 2. The RdbStore must be not nullptr. 6286 * 3. The tablesNames must be not empty string. 6287 * @throws { BusinessError } 801 - Capability not supported. 6288 * @throws { BusinessError } 14800000 - Inner error. 6289 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6290 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6291 * @throws { BusinessError } 14800015 - The database does not respond. 6292 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6293 * Possible causes: Insert failed or the updated data does not exist. 6294 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6295 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6296 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6297 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6298 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6299 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6300 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6301 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6302 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6303 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6304 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6305 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6306 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6307 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6308 * @since 12 6309 */ 6310 cleanDirtyData(table: string, callback: AsyncCallback<void>): void; 6311 6312 /** 6313 * Cleans dirty data deleted in the cloud. 6314 * 6315 * If a cursor is specified, data with a cursor smaller than the specified cursor will be cleaned up. 6316 * otherwise clean all. 6317 * 6318 * @param { string } table - Indicates the name of the table to check. 6319 * @param { number } [cursor] - Indicates the cursor. 6320 * @returns { Promise<void> } -The promise returned by the function. 6321 * @throws { BusinessError } 801 - Capability not supported. 6322 * @throws { BusinessError } 14800000 - Inner error. 6323 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6324 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6325 * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. 6326 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6327 * @since 11 6328 */ 6329 /** 6330 * Cleans dirty data deleted in the cloud. 6331 * 6332 * If a cursor is specified, data with a cursor smaller than the specified cursor will be cleaned up. 6333 * otherwise clean all. 6334 * 6335 * @param { string } table - Indicates the name of the table to check. 6336 * @param { number } [cursor] - Indicates the cursor. 6337 * @returns { Promise<void> } -The promise returned by the function. 6338 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6339 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6340 * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. 6341 * @throws { BusinessError } 801 - Capability not supported. 6342 * @throws { BusinessError } 14800000 - Inner error. 6343 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6344 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6345 * @throws { BusinessError } 14800015 - The database does not respond. 6346 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6347 * Possible causes: Insert failed or the updated data does not exist. 6348 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6349 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6350 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6351 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6352 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6353 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6354 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6355 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6356 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6357 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6358 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6359 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6360 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6361 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6362 * @since 12 6363 */ 6364 cleanDirtyData(table: string, cursor?: number): Promise<void>; 6365 6366 /** 6367 * Obtains sharing resource of rows corresponding to the predicates. 6368 * 6369 * @param { RdbPredicates } predicates - 6370 * The specified query condition by the instance object of {@link RdbPredicates}. 6371 * @param { Array<string> } [columns] - The specified columns to query. 6372 * @returns { Promise<ResultSet> } -The promise returned by the function. 6373 * {@link ResultSet} is query result. 6374 * @throws { BusinessError } 801 - Capability not supported. 6375 * @throws { BusinessError } 14800000 - Inner error. 6376 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6377 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6378 * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. 6379 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6380 * @systemapi 6381 * @since 11 6382 */ 6383 /** 6384 * Obtains sharing resource of rows corresponding to the predicates. 6385 * 6386 * @param { RdbPredicates } predicates - 6387 * The specified query condition by the instance object of {@link RdbPredicates}. 6388 * @param { Array<string> } [columns] - The specified columns to query. 6389 * @returns { Promise<ResultSet> } -The promise returned by the function. 6390 * {@link ResultSet} is query result. 6391 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6392 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6393 * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. 6394 * @throws { BusinessError } 801 - Capability not supported. 6395 * @throws { BusinessError } 14800000 - Inner error. 6396 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6397 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6398 * @throws { BusinessError } 14800015 - The database does not respond. 6399 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6400 * Possible causes: Insert failed or the updated data does not exist. 6401 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6402 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6403 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6404 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6405 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6406 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6407 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6408 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6409 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6410 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6411 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6412 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6413 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6414 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6415 * @systemapi 6416 * @since 12 6417 */ 6418 querySharingResource(predicates: RdbPredicates, columns?: Array<string>): Promise<ResultSet>; 6419 6420 /** 6421 * Obtains sharing resource of rows corresponding to the predicates. 6422 * 6423 * @param { RdbPredicates } predicates - 6424 * The specified query condition by the instance object of {@link RdbPredicates}. 6425 * @param { AsyncCallback<ResultSet> } callback - The callback of querySharingResource. 6426 * {@link ResultSet} is query result. 6427 * @throws { BusinessError } 801 - Capability not supported. 6428 * @throws { BusinessError } 14800000 - Inner error. 6429 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6430 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6431 * 3. The predicates must be an RdbPredicates. 6432 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6433 * @systemapi 6434 * @since 11 6435 */ 6436 /** 6437 * Obtains sharing resource of rows corresponding to the predicates. 6438 * 6439 * @param { RdbPredicates } predicates - 6440 * The specified query condition by the instance object of {@link RdbPredicates}. 6441 * @param { AsyncCallback<ResultSet> } callback - The callback of querySharingResource. 6442 * {@link ResultSet} is query result. 6443 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6444 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6445 * 3. The predicates must be an RdbPredicates. 6446 * @throws { BusinessError } 801 - Capability not supported. 6447 * @throws { BusinessError } 14800000 - Inner error. 6448 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6449 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6450 * @throws { BusinessError } 14800015 - The database does not respond. 6451 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6452 * Possible causes: Insert failed or the updated data does not exist. 6453 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6454 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6455 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6456 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6457 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6458 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6459 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6460 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6461 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6462 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6463 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6464 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6465 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6466 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6467 * @systemapi 6468 * @since 12 6469 */ 6470 querySharingResource(predicates: RdbPredicates, callback: AsyncCallback<ResultSet>): void; 6471 6472 /** 6473 * Obtains sharing resource of rows corresponding to the predicates. 6474 * 6475 * @param { RdbPredicates } predicates - 6476 * The specified query condition by the instance object of {@link RdbPredicates}. 6477 * @param { Array<string> } columns - The specified columns to query. 6478 * @param { AsyncCallback<ResultSet> } callback - The callback of querySharingResource. 6479 * {@link ResultSet} is query result. 6480 * @throws { BusinessError } 801 - Capability not supported. 6481 * @throws { BusinessError } 14800000 - Inner error. 6482 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6483 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6484 * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. 6485 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6486 * @systemapi 6487 * @since 11 6488 */ 6489 /** 6490 * Obtains sharing resource of rows corresponding to the predicates. 6491 * 6492 * @param { RdbPredicates } predicates - 6493 * The specified query condition by the instance object of {@link RdbPredicates}. 6494 * @param { Array<string> } columns - The specified columns to query. 6495 * @param { AsyncCallback<ResultSet> } callback - The callback of querySharingResource. 6496 * {@link ResultSet} is query result. 6497 * @throws { BusinessError } 401 - Parameter error. Possible causes: 6498 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 6499 * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. 6500 * @throws { BusinessError } 801 - Capability not supported. 6501 * @throws { BusinessError } 14800000 - Inner error. 6502 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6503 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6504 * @throws { BusinessError } 14800015 - The database does not respond. 6505 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6506 * Possible causes: Insert failed or the updated data does not exist. 6507 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6508 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6509 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6510 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6511 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6512 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6513 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6514 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6515 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6516 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6517 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6518 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6519 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6520 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6521 * @systemapi 6522 * @since 12 6523 */ 6524 querySharingResource(predicates: RdbPredicates, columns: Array<string>, callback: AsyncCallback<ResultSet>): void; 6525 6526 /** 6527 * Executes a SQL statement that contains specified parameters but returns no value. 6528 * 6529 * @param { string } sql - Indicates the SQL statement to execute. 6530 * @param { AsyncCallback<void> } callback - The callback of executeSql. 6531 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6532 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6533 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6534 * @throws { BusinessError } 14800000 - Inner error. 6535 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6536 * @crossplatform 6537 * @since 10 6538 */ 6539 /** 6540 * Executes a SQL statement that contains specified parameters but returns no value. 6541 * 6542 * @param { string } sql - Indicates the SQL statement to execute. 6543 * @param { AsyncCallback<void> } callback - The callback of executeSql. 6544 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6545 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6546 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 6547 * @throws { BusinessError } 14800000 - Inner error. 6548 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6549 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6550 * @throws { BusinessError } 14800015 - The database does not respond. 6551 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6552 * Possible causes: Insert failed or the updated data does not exist. 6553 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6554 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6555 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6556 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6557 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6558 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6559 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6560 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6561 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6562 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6563 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6564 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6565 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6566 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6567 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6568 * @crossplatform 6569 * @since arkts {'1.1':'12', '1.2':'20'} 6570 * @arkts 1.1&1.2 6571 */ 6572 executeSql(sql: string, callback: AsyncCallback<void>): void; 6573 6574 /** 6575 * Executes a SQL statement that contains specified parameters but returns no value. 6576 * 6577 * @param { string } sql - Indicates the SQL statement to execute. 6578 * @param { Array<ValueType> } bindArgs - 6579 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6580 * @param { AsyncCallback<void> } callback - The callback of executeSql. 6581 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6582 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6583 * @throws { BusinessError } 14800000 - Inner error. 6584 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6585 * @since 9 6586 */ 6587 /** 6588 * Executes a SQL statement that contains specified parameters but returns no value. 6589 * 6590 * @param { string } sql - Indicates the SQL statement to execute. 6591 * @param { Array<ValueType> } bindArgs - 6592 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6593 * @param { AsyncCallback<void> } callback - The callback of executeSql. 6594 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6595 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6596 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6597 * @throws { BusinessError } 14800000 - Inner error. 6598 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6599 * @crossplatform 6600 * @since 10 6601 */ 6602 /** 6603 * Executes a SQL statement that contains specified parameters but returns no value. 6604 * 6605 * @param { string } sql - Indicates the SQL statement to execute. 6606 * @param { Array<ValueType> } bindArgs - 6607 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6608 * @param { AsyncCallback<void> } callback - The callback of executeSql. 6609 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6610 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6611 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 6612 * @throws { BusinessError } 14800000 - Inner error. 6613 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6614 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6615 * @throws { BusinessError } 14800015 - The database does not respond. 6616 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6617 * Possible causes: Insert failed or the updated data does not exist. 6618 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6619 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6620 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6621 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6622 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6623 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6624 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6625 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6626 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6627 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6628 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6629 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6630 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6631 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6632 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6633 * @crossplatform 6634 * @since arkts {'1.1':'12', '1.2':'20'} 6635 * @arkts 1.1&1.2 6636 */ 6637 executeSql(sql: string, bindArgs: Array<ValueType>, callback: AsyncCallback<void>): void; 6638 6639 /** 6640 * Executes a SQL statement that contains specified parameters but returns no value. 6641 * 6642 * @param { string } sql - Indicates the SQL statement to execute. 6643 * @param { Array<ValueType> } bindArgs - 6644 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6645 * @returns { Promise<void> } The promise returned by the function. 6646 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6647 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6648 * @throws { BusinessError } 14800000 - Inner error. 6649 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6650 * @since 9 6651 */ 6652 /** 6653 * Executes a SQL statement that contains specified parameters but returns no value. 6654 * 6655 * @param { string } sql - Indicates the SQL statement to execute. 6656 * @param { Array<ValueType> } bindArgs - 6657 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6658 * @returns { Promise<void> } The promise returned by the function. 6659 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6660 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6661 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6662 * @throws { BusinessError } 14800000 - Inner error. 6663 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6664 * @crossplatform 6665 * @since 10 6666 */ 6667 /** 6668 * Executes a SQL statement that contains specified parameters but returns no value. 6669 * 6670 * @param { string } sql - Indicates the SQL statement to execute. 6671 * @param { Array<ValueType> } bindArgs - 6672 * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6673 * @returns { Promise<void> } The promise returned by the function. 6674 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6675 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6676 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 6677 * @throws { BusinessError } 14800000 - Inner error. 6678 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6679 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6680 * @throws { BusinessError } 14800015 - The database does not respond. 6681 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6682 * Possible causes: Insert failed or the updated data does not exist. 6683 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6684 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6685 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6686 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6687 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6688 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6689 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6690 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6691 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6692 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6693 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6694 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6695 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6696 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6697 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6698 * @crossplatform 6699 * @since arkts {'1.1':'12', '1.2':'20'} 6700 * @arkts 1.1&1.2 6701 */ 6702 executeSql(sql: string, bindArgs?: Array<ValueType>): Promise<void>; 6703 6704 /** 6705 * Executes a SQL statement that contains specified parameters and returns a value of ValueType. 6706 * 6707 * @param { string } sql - Indicates the SQL statement to execute. 6708 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. 6709 * The values are strings. 6710 * @returns { Promise<ValueType> } The promise returned by the function. 6711 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6712 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6713 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 6714 * @throws { BusinessError } 14800000 - Inner error. 6715 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6716 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6717 * @throws { BusinessError } 14800015 - The database does not respond. 6718 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6719 * Possible causes: Insert failed or the updated data does not exist. 6720 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6721 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6722 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6723 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6724 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6725 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6726 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6727 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6728 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6729 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6730 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6731 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6732 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6733 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6734 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6735 * @since 12 6736 */ 6737 execute(sql: string, args?: Array<ValueType>): Promise<ValueType>; 6738 6739 /** 6740 * Executes a SQL statement that contains specified parameters and returns a value of ValueType. 6741 * 6742 * @param { string } sql - Indicates the SQL statement to execute. 6743 * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans or 0. 6744 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. 6745 * The values are strings. 6746 * @returns { Promise<ValueType> } The promise returned by the function. 6747 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6748 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6749 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 6750 * @throws { BusinessError } 14800000 - Inner error. 6751 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6752 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6753 * @throws { BusinessError } 14800015 - The database does not respond. 6754 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6755 * Possible causes: Insert failed or the updated data does not exist. 6756 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6757 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6758 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6759 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6760 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6761 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6762 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6763 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6764 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6765 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6766 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6767 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6768 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6769 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6770 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6771 * @since 12 6772 */ 6773 execute(sql: string, txId: number, args?: Array<ValueType>): Promise<ValueType>; 6774 6775 /** 6776 * Executes a SQL statement that contains specified parameters and returns a value of ValueType with sync interface. 6777 * 6778 * @param { string } sql - Indicates the SQL statement to execute. 6779 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. 6780 * The values are strings. 6781 * @returns { ValueType } The promise returned by the function. 6782 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6783 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6784 * @throws { BusinessError } 14800000 - Inner error. 6785 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6786 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6787 * @throws { BusinessError } 14800015 - The database does not respond. 6788 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6789 * Possible causes: Insert failed or the updated data does not exist. 6790 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6791 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6792 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6793 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6794 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6795 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6796 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6797 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6798 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6799 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6800 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6801 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6802 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6803 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6804 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6805 * @crossplatform 6806 * @since 12 6807 */ 6808 executeSync(sql: string, args?: Array<ValueType>): ValueType; 6809 6810 /** 6811 * BeginTransaction before execute your sql. 6812 * 6813 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 6814 * @throws { BusinessError } 14800000 - Inner error. 6815 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6816 * @since 9 6817 */ 6818 /** 6819 * BeginTransaction before execute your sql. 6820 * 6821 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6822 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 6823 * @throws { BusinessError } 14800000 - Inner error. 6824 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6825 * @crossplatform 6826 * @since 10 6827 */ 6828 /** 6829 * BeginTransaction before execute your sql. 6830 * 6831 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 6832 * @throws { BusinessError } 14800000 - Inner error. 6833 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6834 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6835 * @throws { BusinessError } 14800015 - The database does not respond. 6836 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6837 * Possible causes: Insert failed or the updated data does not exist. 6838 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6839 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6840 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6841 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6842 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6843 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6844 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6845 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6846 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6847 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6848 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6849 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6850 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6851 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6852 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6853 * @crossplatform 6854 * @since arkts {'1.1':'12', '1.2':'20'} 6855 * @arkts 1.1&1.2 6856 */ 6857 beginTransaction(): void; 6858 6859 /** 6860 * Begins a transaction before executing the SQL statement. 6861 * 6862 * @returns { Promise<number> } Returns the transaction ID. 6863 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 6864 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 6865 * @throws { BusinessError } 14800000 - Inner error. 6866 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6867 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6868 * @throws { BusinessError } 14800015 - The database does not respond. 6869 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6870 * Possible causes: Insert failed or the updated data does not exist. 6871 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6872 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6873 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6874 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6875 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6876 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6877 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6878 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6879 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6880 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6881 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6882 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6883 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6884 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6885 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6886 * @since 12 6887 */ 6888 beginTrans(): Promise<number>; 6889 6890 /** 6891 * Commit the the sql you have executed. 6892 * 6893 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 6894 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6895 * @since 9 6896 */ 6897 /** 6898 * Commit the the sql you have executed. 6899 * 6900 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 6901 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6902 * @crossplatform 6903 * @since 10 6904 */ 6905 /** 6906 * Commit the the sql you have executed. 6907 * 6908 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 6909 * @throws { BusinessError } 14800000 - Inner error. 6910 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6911 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6912 * @throws { BusinessError } 14800015 - The database does not respond. 6913 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6914 * Possible causes: Insert failed or the updated data does not exist. 6915 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6916 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6917 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6918 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6919 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6920 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6921 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6922 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6923 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6924 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6925 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6926 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6927 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6928 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6929 * @crossplatform 6930 * @since arkts {'1.1':'12', '1.2':'20'} 6931 * @arkts 1.1&1.2 6932 */ 6933 commit(): void; 6934 6935 /** 6936 * Commits the SQL statement executed. 6937 * 6938 * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans. 6939 * @returns { Promise<void> } Promise used to return the result. 6940 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6941 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 6942 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6943 * @throws { BusinessError } 14800000 - Inner error. 6944 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6945 * @throws { BusinessError } 14800015 - The database does not respond. 6946 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6947 * Possible causes: Insert failed or the updated data does not exist. 6948 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6949 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6950 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6951 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6952 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6953 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6954 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6955 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6956 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6957 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6958 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6959 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6960 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6961 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6962 * @since 12 6963 */ 6964 commit(txId : number): Promise<void>; 6965 6966 /** 6967 * Roll back the sql you have already executed. 6968 * 6969 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 6970 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6971 * @since 9 6972 */ 6973 /** 6974 * Roll back the sql you have already executed. 6975 * 6976 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 6977 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6978 * @crossplatform 6979 * @since 10 6980 */ 6981 /** 6982 * Roll back the sql you have already executed. 6983 * 6984 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 6985 * @throws { BusinessError } 14800000 - Inner error. 6986 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 6987 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 6988 * @throws { BusinessError } 14800015 - The database does not respond. 6989 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6990 * Possible causes: Insert failed or the updated data does not exist. 6991 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6992 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6993 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6994 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6995 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6996 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6997 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6998 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6999 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7000 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7001 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7002 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7003 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7004 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7005 * @crossplatform 7006 * @since arkts {'1.1':'12', '1.2':'20'} 7007 * @arkts 1.1&1.2 7008 */ 7009 rollBack(): void; 7010 7011 /** 7012 * Rolls back the SQL statement executed. 7013 * 7014 * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans. 7015 * @returns { Promise<void> } Promise used to return the result. 7016 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7017 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7018 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 7019 * @throws { BusinessError } 14800000 - Inner error. 7020 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7021 * @throws { BusinessError } 14800015 - The database does not respond. 7022 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7023 * Possible causes: Insert failed or the updated data does not exist. 7024 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7025 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7026 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7027 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7028 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7029 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7030 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7031 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7032 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7033 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7034 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7035 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7036 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7037 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7038 * @since 12 7039 */ 7040 rollback(txId : number): Promise<void>; 7041 7042 /** 7043 * Backs up a database in a specified name. 7044 * 7045 * @param { string } destName - Indicates the name that saves the database backup. 7046 * @param { AsyncCallback<void> } callback - The callback of backup. 7047 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7048 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7049 * @throws { BusinessError } 14800000 - Inner error. 7050 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7051 * @since 9 7052 */ 7053 /** 7054 * Backs up a database in a specified name. 7055 * 7056 * @param { string } destName - Indicates the name that saves the database backup. 7057 * @param { AsyncCallback<void> } callback - The callback of backup. 7058 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7059 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7060 * @throws { BusinessError } 14800000 - Inner error. 7061 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7062 * @crossplatform 7063 * @since 10 7064 */ 7065 /** 7066 * Backs up a database in a specified name. 7067 * 7068 * @param { string } destName - Indicates the name that saves the database backup. 7069 * @param { AsyncCallback<void> } callback - The callback of backup. 7070 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7071 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7072 * @throws { BusinessError } 14800000 - Inner error. 7073 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 7074 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 7075 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7076 * @throws { BusinessError } 14800015 - The database does not respond. 7077 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7078 * Possible causes: Insert failed or the updated data does not exist. 7079 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7080 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7081 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7082 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7083 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7084 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7085 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7086 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7087 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7088 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7089 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7090 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7091 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7092 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7093 * @crossplatform 7094 * @since 12 7095 */ 7096 backup(destName: string, callback: AsyncCallback<void>): void; 7097 7098 /** 7099 * Backs up a database in a specified name. 7100 * 7101 * @param { string } destName - Indicates the name that saves the database backup. 7102 * @returns { Promise<void> } The promise returned by the function. 7103 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7104 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7105 * @throws { BusinessError } 14800000 - Inner error. 7106 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7107 * @since 9 7108 */ 7109 /** 7110 * Backs up a database in a specified name. 7111 * 7112 * @param { string } destName - Indicates the name that saves the database backup. 7113 * @returns { Promise<void> } The promise returned by the function. 7114 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7115 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7116 * @throws { BusinessError } 14800000 - Inner error. 7117 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7118 * @crossplatform 7119 * @since 10 7120 */ 7121 /** 7122 * Backs up a database in a specified name. 7123 * 7124 * @param { string } destName - Indicates the name that saves the database backup. 7125 * @returns { Promise<void> } The promise returned by the function. 7126 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7127 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7128 * @throws { BusinessError } 14800000 - Inner error. 7129 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 7130 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7131 * @throws { BusinessError } 14800015 - The database does not respond. 7132 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7133 * Possible causes: Insert failed or the updated data does not exist. 7134 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7135 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7136 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7137 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7138 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7139 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7140 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7141 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7142 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7143 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7144 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7145 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7146 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7147 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7148 * @crossplatform 7149 * @since 12 7150 */ 7151 backup(destName: string): Promise<void>; 7152 7153 /** 7154 * Restores a database from a specified database file. 7155 * 7156 * @param { string } srcName - Indicates the name that saves the database file. 7157 * @param { AsyncCallback<void> } callback - The callback of restore. 7158 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7159 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7160 * @throws { BusinessError } 14800000 - Inner error. 7161 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7162 * @since 9 7163 */ 7164 /** 7165 * Restores a database from a specified database file. 7166 * 7167 * @param { string } srcName - Indicates the name that saves the database file. 7168 * @param { AsyncCallback<void> } callback - The callback of restore. 7169 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7170 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7171 * @throws { BusinessError } 14800000 - Inner error. 7172 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7173 * @crossplatform 7174 * @since 10 7175 */ 7176 /** 7177 * Restores a database from a specified database file. 7178 * 7179 * @param { string } srcName - Indicates the name that saves the database file. 7180 * @param { AsyncCallback<void> } callback - The callback of restore. 7181 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7182 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7183 * @throws { BusinessError } 14800000 - Inner error. 7184 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 7185 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7186 * @throws { BusinessError } 14800015 - The database does not respond. 7187 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7188 * Possible causes: Insert failed or the updated data does not exist. 7189 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7190 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7191 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7192 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7193 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7194 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7195 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7196 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7197 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7198 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7199 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7200 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7201 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7202 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7203 * @crossplatform 7204 * @since 12 7205 */ 7206 restore(srcName: string, callback: AsyncCallback<void>): void; 7207 7208 /** 7209 * Restores a database from a specified database file. 7210 * 7211 * @param { string } srcName - Indicates the name that saves the database file. 7212 * @returns { Promise<void> } The promise returned by the function. 7213 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7214 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7215 * @throws { BusinessError } 14800000 - Inner error. 7216 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7217 * @since 9 7218 */ 7219 /** 7220 * Restores a database from a specified database file. 7221 * 7222 * @param { string } srcName - Indicates the name that saves the database file. 7223 * @returns { Promise<void> } The promise returned by the function. 7224 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7225 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7226 * @throws { BusinessError } 14800000 - Inner error. 7227 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7228 * @crossplatform 7229 * @since 10 7230 */ 7231 /** 7232 * Restores a database from a specified database file. 7233 * 7234 * @param { string } srcName - Indicates the name that saves the database file. 7235 * @returns { Promise<void> } The promise returned by the function. 7236 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7237 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7238 * @throws { BusinessError } 14800000 - Inner error. 7239 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 7240 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7241 * @throws { BusinessError } 14800015 - The database does not respond. 7242 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7243 * Possible causes: Insert failed or the updated data does not exist. 7244 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7245 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7246 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7247 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7248 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7249 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7250 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7251 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7252 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7253 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7254 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7255 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7256 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7257 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7258 * @crossplatform 7259 * @since 12 7260 */ 7261 restore(srcName: string): Promise<void>; 7262 7263 /** 7264 * Restores a database from a specified database file. 7265 * 7266 * @returns { Promise<void> } The promise returned by the function. 7267 * @throws { BusinessError } 202 - Permission verification failed, 7268 * application which is not a system application uses system API. 7269 * @throws { BusinessError } 14800000 - Inner error. 7270 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 7271 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 7272 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7273 * @throws { BusinessError } 14800015 - The database does not respond. 7274 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7275 * Possible causes: Insert failed or the updated data does not exist. 7276 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7277 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7278 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7279 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7280 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7281 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7282 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7283 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7284 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7285 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7286 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7287 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7288 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7289 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7290 * @systemapi 7291 * @since 12 7292 */ 7293 restore(): Promise<void>; 7294 7295 /** 7296 * Set table to be distributed table. 7297 * 7298 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7299 * @param { Array<string> } tables - Indicates the table names you want to set. 7300 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 7301 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7302 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7303 * @throws { BusinessError } 14800000 - Inner error. 7304 * @throws { BusinessError } 801 - Capability not supported. 7305 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7306 * @since 9 7307 */ 7308 /** 7309 * Set table to be distributed table. 7310 * 7311 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7312 * @param { Array<string> } tables - Indicates the table names you want to set. 7313 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 7314 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7315 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7316 * @throws { BusinessError } 801 - Capability not supported. 7317 * @throws { BusinessError } 14800000 - Inner error. 7318 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7319 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7320 * @since 12 7321 */ 7322 setDistributedTables(tables: Array<string>, callback: AsyncCallback<void>): void; 7323 7324 /** 7325 * Set table to be distributed table. 7326 * 7327 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7328 * @param { Array<string> } tables - Indicates the table names you want to set. 7329 * @returns { Promise<void> } The promise returned by the function. 7330 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7331 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7332 * @throws { BusinessError } 14800000 - Inner error. 7333 * @throws { BusinessError } 801 - Capability not supported. 7334 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7335 * @since 9 7336 */ 7337 /** 7338 * Set table to be distributed table. 7339 * 7340 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7341 * @param { Array<string> } tables - Indicates the table names you want to set. 7342 * @returns { Promise<void> } The promise returned by the function. 7343 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7344 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7345 * @throws { BusinessError } 801 - Capability not supported. 7346 * @throws { BusinessError } 14800000 - Inner error. 7347 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7348 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7349 * @since 12 7350 */ 7351 setDistributedTables(tables: Array<string>): Promise<void>; 7352 7353 /** 7354 * Set table to be distributed table. 7355 * 7356 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7357 * @param { Array<string> } tables - Indicates the table names you want to set. 7358 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 7359 * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD 7360 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 7361 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7362 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7363 * @throws { BusinessError } 14800000 - Inner error. 7364 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 7365 * @throws { BusinessError } 801 - Capability not supported. 7366 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7367 * @since 10 7368 */ 7369 /** 7370 * Set table to be distributed table. 7371 * 7372 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7373 * @param { Array<string> } tables - Indicates the table names you want to set. 7374 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 7375 * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. 7376 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 7377 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7378 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7379 * @throws { BusinessError } 801 - Capability not supported. 7380 * @throws { BusinessError } 14800000 - Inner error. 7381 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7382 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 7383 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7384 * @since 12 7385 */ 7386 setDistributedTables(tables: Array<string>, type: DistributedType, callback: AsyncCallback<void>): void; 7387 7388 /** 7389 * Set table to be distributed table. 7390 * 7391 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7392 * @param { Array<string> } tables - Indicates the table names you want to set. 7393 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 7394 * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD 7395 * @param { DistributedConfig } config - 7396 * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. 7397 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 7398 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7399 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7400 * @throws { BusinessError } 14800000 - Inner error. 7401 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 7402 * @throws { BusinessError } 801 - Capability not supported. 7403 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7404 * @since 10 7405 */ 7406 /** 7407 * Set table to be distributed table. 7408 * 7409 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7410 * @param { Array<string> } tables - Indicates the table names you want to set. 7411 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 7412 * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. 7413 * @param { DistributedConfig } config - 7414 * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. 7415 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 7416 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7417 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7418 * @throws { BusinessError } 801 - Capability not supported. 7419 * @throws { BusinessError } 14800000 - Inner error. 7420 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7421 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 7422 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7423 * @since 12 7424 */ 7425 setDistributedTables( 7426 tables: Array<string>, 7427 type: DistributedType, 7428 config: DistributedConfig, 7429 callback: AsyncCallback<void> 7430 ): void; 7431 7432 /** 7433 * Set table to be a distributed table. 7434 * 7435 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7436 * @param { Array<string> } tables - Indicates the table names you want to set. 7437 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 7438 * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD 7439 * @param { DistributedConfig } config - 7440 * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. 7441 * @returns { Promise<void> } The promise returned by the function. 7442 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7443 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7444 * @throws { BusinessError } 14800000 - Inner error. 7445 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 7446 * @throws { BusinessError } 801 - Capability not supported. 7447 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7448 * @since 10 7449 */ 7450 /** 7451 * Set table to be a distributed table. 7452 * 7453 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7454 * @param { Array<string> } tables - Indicates the table names you want to set. 7455 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 7456 * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. 7457 * @param { DistributedConfig } config - 7458 * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. 7459 * @returns { Promise<void> } The promise returned by the function. 7460 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7461 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7462 * @throws { BusinessError } 801 - Capability not supported. 7463 * @throws { BusinessError } 14800000 - Inner error. 7464 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7465 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 7466 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7467 * @since 12 7468 */ 7469 setDistributedTables(tables: Array<string>, type?: DistributedType, config?: DistributedConfig): Promise<void>; 7470 7471 /** 7472 * Obtain distributed table name of specified remote device according to local table name. 7473 * When query remote device database, distributed table name is needed. 7474 * 7475 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7476 * @param { string } device - Indicates the remote device. 7477 * @param { string } table - {string}: the distributed table name. 7478 * @param { AsyncCallback<string> } callback 7479 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7480 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7481 * @throws { BusinessError } 14800000 - Inner error. 7482 * @throws { BusinessError } 801 - Capability not supported. 7483 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7484 * @since 9 7485 */ 7486 /** 7487 * Obtain distributed table name of specified remote device according to local table name. 7488 * When query remote device database, distributed table name is needed. 7489 * 7490 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7491 * @param { string } device - Indicates the remote device. 7492 * @param { string } table - {string}: the distributed table name. 7493 * @param { AsyncCallback<string> } callback 7494 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7495 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7496 * @throws { BusinessError } 801 - Capability not supported. 7497 * @throws { BusinessError } 14800000 - Inner error. 7498 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7499 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7500 * @since 12 7501 */ 7502 obtainDistributedTableName(device: string, table: string, callback: AsyncCallback<string>): void; 7503 7504 /** 7505 * Obtain distributed table name of specified remote device according to local table name. 7506 * When query remote device database, distributed table name is needed. 7507 * 7508 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7509 * @param { string } device - Indicates the remote device. 7510 * @param { string } table 7511 * @returns { Promise<string> } {string}: the distributed table name. 7512 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7513 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7514 * @throws { BusinessError } 14800000 - Inner error. 7515 * @throws { BusinessError } 801 - Capability not supported. 7516 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7517 * @since 9 7518 */ 7519 /** 7520 * Obtain distributed table name of specified remote device according to local table name. 7521 * When query remote device database, distributed table name is needed. 7522 * 7523 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7524 * @param { string } device - Indicates the remote device. 7525 * @param { string } table 7526 * @returns { Promise<string> } {string}: the distributed table name. 7527 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7528 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7529 * @throws { BusinessError } 801 - Capability not supported. 7530 * @throws { BusinessError } 14800000 - Inner error. 7531 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7532 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7533 * @since 12 7534 */ 7535 obtainDistributedTableName(device: string, table: string): Promise<string>; 7536 7537 /** 7538 * Sync data between devices. 7539 * 7540 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7541 * @param { SyncMode } mode - Indicates the database synchronization mode. 7542 * @param { RdbPredicates } predicates - 7543 * The specified sync condition by the instance object of {@link RdbPredicates}. 7544 * @param { AsyncCallback<Array<[string, number]>> } callback - 7545 * {Array<[string, number]>}: devices sync status array, 7546 * {string}: device id, 7547 * {number}: device sync status. 7548 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7549 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7550 * @throws { BusinessError } 14800000 - Inner error. 7551 * @throws { BusinessError } 801 - Capability not supported. 7552 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7553 * @since 9 7554 */ 7555 /** 7556 * Sync data between devices. 7557 * 7558 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7559 * @param { SyncMode } mode - Indicates the database synchronization mode. 7560 * @param { RdbPredicates } predicates - 7561 * The specified sync condition by the instance object of {@link RdbPredicates}. 7562 * @param { AsyncCallback<Array<[string, number]>> } callback - 7563 * {Array<[string, number]>}: devices sync status array, 7564 * {string}: device id, 7565 * {number}: device sync status. 7566 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7567 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7568 * @throws { BusinessError } 801 - Capability not supported. 7569 * @throws { BusinessError } 14800000 - Inner error. 7570 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7571 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7572 * @since 12 7573 */ 7574 sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback<Array<[string, number]>>): void; 7575 7576 /** 7577 * Sync data between devices. 7578 * 7579 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7580 * @param { SyncMode } mode - Indicates the database synchronization mode. 7581 * @param { RdbPredicates } predicates - 7582 * The specified sync condition by the instance object of {@link RdbPredicates}. 7583 * @returns { Promise<Array<[string, number]>> } 7584 * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 7585 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7586 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7587 * @throws { BusinessError } 14800000 - Inner error. 7588 * @throws { BusinessError } 801 - Capability not supported. 7589 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7590 * @since 9 7591 */ 7592 /** 7593 * Sync data between devices. 7594 * 7595 * @permission ohos.permission.DISTRIBUTED_DATASYNC 7596 * @param { SyncMode } mode - Indicates the database synchronization mode. 7597 * @param { RdbPredicates } predicates - 7598 * The specified sync condition by the instance object of {@link RdbPredicates}. 7599 * @returns { Promise<Array<[string, number]>> } 7600 * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 7601 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7602 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7603 * @throws { BusinessError } 801 - Capability not supported. 7604 * @throws { BusinessError } 14800000 - Inner error. 7605 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7606 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7607 * @since 12 7608 */ 7609 sync(mode: SyncMode, predicates: RdbPredicates): Promise<Array<[string, number]>>; 7610 7611 /** 7612 * Sync data to cloud. 7613 * 7614 * @param { SyncMode } mode - indicates the database synchronization mode. 7615 * @param { Callback<ProgressDetails> } progress - 7616 * Callback used to return the {@link ProgressDetails} result. 7617 * @param { AsyncCallback<void> } callback - 7618 * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 7619 * @throws { BusinessError } 401 - Parameter error. 7620 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7621 * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. 7622 * 5. The callback must be a function. 7623 * @throws { BusinessError } 801 - Capability not supported. 7624 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7625 * @since 10 7626 */ 7627 /** 7628 * Sync data to cloud. 7629 * 7630 * @param { SyncMode } mode - indicates the database synchronization mode. 7631 * @param { Callback<ProgressDetails> } progress - 7632 * Callback used to return the {@link ProgressDetails} result. 7633 * @param { AsyncCallback<void> } callback - 7634 * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 7635 * @throws { BusinessError } 401 - Parameter error. 7636 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7637 * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. 7638 * 5. The callback must be a function. 7639 * @throws { BusinessError } 801 - Capability not supported. 7640 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7641 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7642 * @since 12 7643 */ 7644 cloudSync(mode: SyncMode, progress: Callback<ProgressDetails>, callback: AsyncCallback<void>): void; 7645 7646 /** 7647 * Sync data to cloud. 7648 * 7649 * @param { SyncMode } mode - indicates the database synchronization mode. 7650 * @param { Callback<ProgressDetails> } progress - 7651 * Callback used to return the {@link ProgressDetails} result. 7652 * @returns { Promise<void> } : devices sync status array, {string}: device id, {number}: device sync status. 7653 * @throws { BusinessError } 401 - Parameter error. 7654 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7655 * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. 7656 * @throws { BusinessError } 801 - Capability not supported. 7657 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7658 * @since 10 7659 */ 7660 /** 7661 * Sync data to cloud. 7662 * 7663 * @param { SyncMode } mode - indicates the database synchronization mode. 7664 * @param { Callback<ProgressDetails> } progress - 7665 * Callback used to return the {@link ProgressDetails} result. 7666 * @returns { Promise<void> } : devices sync status array, {string}: device id, {number}: device sync status. 7667 * @throws { BusinessError } 401 - Parameter error. 7668 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7669 * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. 7670 * @throws { BusinessError } 801 - Capability not supported. 7671 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7672 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7673 * @since 12 7674 */ 7675 cloudSync(mode: SyncMode, progress: Callback<ProgressDetails>): Promise<void>; 7676 7677 /** 7678 * Sync data to cloud. 7679 * 7680 * @param { SyncMode } mode - indicates the database synchronization mode. 7681 * @param { string[] } tables - indicates the database synchronization mode. 7682 * @param { Callback<ProgressDetails> } progress - 7683 * Callback used to return the {@link ProgressDetails} result. 7684 * @param { AsyncCallback<void> } callback - 7685 * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 7686 * @throws { BusinessError } 401 - Parameter error. 7687 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7688 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 7689 * 5. The progress must be a callback type. 6. The callback must be a function. 7690 * @throws { BusinessError } 801 - Capability not supported. 7691 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7692 * @since 10 7693 */ 7694 /** 7695 * Sync data to cloud. 7696 * 7697 * @param { SyncMode } mode - indicates the database synchronization mode. 7698 * @param { string[] } tables - indicates the database synchronization mode. 7699 * @param { Callback<ProgressDetails> } progress - 7700 * Callback used to return the {@link ProgressDetails} result. 7701 * @param { AsyncCallback<void> } callback - 7702 * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 7703 * @throws { BusinessError } 401 - Parameter error. 7704 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7705 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 7706 * 5. The progress must be a callback type. 6. The callback must be a function. 7707 * @throws { BusinessError } 801 - Capability not supported. 7708 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7709 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7710 * @since 12 7711 */ 7712 cloudSync( 7713 mode: SyncMode, 7714 tables: string[], 7715 progress: Callback<ProgressDetails>, 7716 callback: AsyncCallback<void> 7717 ): void; 7718 7719 /** 7720 * Sync data to cloud. 7721 * 7722 * @param { SyncMode } mode - indicates the database synchronization mode. 7723 * @param { string[] } tables - indicates the database synchronization mode. 7724 * @param { Callback<ProgressDetails> } progress - 7725 * Callback used to return the {@link ProgressDetails} result. 7726 * @returns { Promise<void> } : devices sync status array, {string}: device id, {number}: device sync status. 7727 * @throws { BusinessError } 401 - Parameter error. 7728 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7729 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 7730 * 5. The progress must be a callback type. 7731 * @throws { BusinessError } 801 - Capability not supported. 7732 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7733 * @since 10 7734 */ 7735 /** 7736 * Sync data to cloud. 7737 * 7738 * @param { SyncMode } mode - indicates the database synchronization mode. 7739 * @param { string[] } tables - indicates the database synchronization mode. 7740 * @param { Callback<ProgressDetails> } progress - 7741 * Callback used to return the {@link ProgressDetails} result. 7742 * @returns { Promise<void> } : devices sync status array, {string}: device id, {number}: device sync status. 7743 * @throws { BusinessError } 401 - Parameter error. 7744 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7745 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 7746 * 5. The progress must be a callback type. 7747 * @throws { BusinessError } 801 - Capability not supported. 7748 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7749 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7750 * @since 12 7751 */ 7752 cloudSync(mode: SyncMode, tables: string[], progress: Callback<ProgressDetails>): Promise<void>; 7753 7754 /** 7755 * Sync data to cloud. 7756 * 7757 * @param { SyncMode } mode - indicates the database synchronization mode. 7758 * @param { RdbPredicates } predicates - 7759 * The specified sync condition by the instance object of {@link RdbPredicates}. 7760 * @param { Callback<ProgressDetails> } progress - 7761 * Callback used to return the {@link ProgressDetails} result. 7762 * @param { AsyncCallback<void> } callback - The callback of cloudSync. 7763 * @throws { BusinessError } 401 - Parameter error. 7764 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7765 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 7766 * 5. The progress must be a callback type. 6. The callback must be a function. 7767 * @throws { BusinessError } 202 - 7768 * if permission verification failed, application which is not a system application uses system API. 7769 * @throws { BusinessError } 801 - Capability not supported. 7770 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7771 * @systemapi 7772 * @since 11 7773 */ 7774 /** 7775 * Sync data to cloud. 7776 * 7777 * @param { SyncMode } mode - indicates the database synchronization mode. 7778 * @param { RdbPredicates } predicates - 7779 * The specified sync condition by the instance object of {@link RdbPredicates}. 7780 * @param { Callback<ProgressDetails> } progress - 7781 * Callback used to return the {@link ProgressDetails} result. 7782 * @param { AsyncCallback<void> } callback - The callback of cloudSync. 7783 * @throws { BusinessError } 202 - 7784 * if permission verification failed, application which is not a system application uses system API. 7785 * @throws { BusinessError } 401 - Parameter error. 7786 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7787 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 7788 * 5. The progress must be a callback type. 6. The callback must be a function. 7789 * @throws { BusinessError } 801 - Capability not supported. 7790 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7791 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7792 * @systemapi 7793 * @since 12 7794 */ 7795 cloudSync( 7796 mode: SyncMode, 7797 predicates: RdbPredicates, 7798 progress: Callback<ProgressDetails>, 7799 callback: AsyncCallback<void> 7800 ): void; 7801 7802 /** 7803 * Sync data to cloud. 7804 * 7805 * @param { SyncMode } mode - indicates the database synchronization mode. 7806 * @param { RdbPredicates } predicates - 7807 * The specified sync condition by the instance object of {@link RdbPredicates}. 7808 * @param { Callback<ProgressDetails> } progress - 7809 * Callback used to return the {@link ProgressDetails} result. 7810 * @returns { Promise<void> } : The promise returned by the function. 7811 * @throws { BusinessError } 401 - Parameter error. 7812 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7813 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 7814 * 5. The progress must be a callback type. 7815 * @throws { BusinessError } 202 - if permission verification failed, application which is not a system 7816 * application uses system API. 7817 * @throws { BusinessError } 801 - Capability not supported. 7818 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7819 * @systemapi 7820 * @since 11 7821 */ 7822 /** 7823 * Sync data to cloud. 7824 * 7825 * @param { SyncMode } mode - indicates the database synchronization mode. 7826 * @param { RdbPredicates } predicates - 7827 * The specified sync condition by the instance object of {@link RdbPredicates}. 7828 * @param { Callback<ProgressDetails> } progress - 7829 * Callback used to return the {@link ProgressDetails} result. 7830 * @returns { Promise<void> } : The promise returned by the function. 7831 * @throws { BusinessError } 202 - if permission verification failed, application which is not a system 7832 * application uses system API. 7833 * @throws { BusinessError } 401 - Parameter error. 7834 * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7835 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 7836 * 5. The progress must be a callback type. 7837 * @throws { BusinessError } 801 - Capability not supported. 7838 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7839 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7840 * @systemapi 7841 * @since 12 7842 */ 7843 cloudSync(mode: SyncMode, predicates: RdbPredicates, progress: Callback<ProgressDetails>): Promise<void>; 7844 7845 /** 7846 * Queries remote data in the database based on specified conditions before Synchronizing Data. 7847 * 7848 * @param { string } device - Indicates specified remote device. 7849 * @param { string } table - Indicates the target table. 7850 * @param { RdbPredicates } predicates - 7851 * The specified remote remote query condition by the instance object of {@link RdbPredicates}. 7852 * @param { Array<string> } columns - The columns to remote query. 7853 * If the value is empty array, the remote query applies to all columns. 7854 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 7855 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7856 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7857 * @throws { BusinessError } 14800000 - Inner error. 7858 * @throws { BusinessError } 801 - Capability not supported. 7859 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7860 * @since 9 7861 */ 7862 /** 7863 * Queries remote data in the database based on specified conditions before Synchronizing Data. 7864 * 7865 * @param { string } device - Indicates specified remote device. 7866 * @param { string } table - Indicates the target table. 7867 * @param { RdbPredicates } predicates - 7868 * The specified remote remote query condition by the instance object of {@link RdbPredicates}. 7869 * @param { Array<string> } columns - The columns to remote query. 7870 * If the value is empty array, the remote query applies to all columns. 7871 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 7872 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7873 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7874 * @throws { BusinessError } 801 - Capability not supported. 7875 * @throws { BusinessError } 14800000 - Inner error. 7876 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7877 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7878 * @since 12 7879 */ 7880 remoteQuery( 7881 device: string, 7882 table: string, 7883 predicates: RdbPredicates, 7884 columns: Array<string>, 7885 callback: AsyncCallback<ResultSet> 7886 ): void; 7887 7888 /** 7889 * Queries remote data in the database based on specified conditions before Synchronizing Data. 7890 * 7891 * @param { string } device - Indicates specified remote device. 7892 * @param { string } table - Indicates the target table. 7893 * @param { RdbPredicates } predicates - 7894 * The specified remote remote query condition by the instance object of {@link RdbPredicates}. 7895 * @param { Array<string> } columns - The columns to remote query. 7896 * If the value is empty array, the remote query applies to all columns. 7897 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 7898 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7899 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7900 * @throws { BusinessError } 14800000 - Inner error. 7901 * @throws { BusinessError } 801 - Capability not supported. 7902 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7903 * @since 9 7904 */ 7905 /** 7906 * Queries remote data in the database based on specified conditions before Synchronizing Data. 7907 * 7908 * @param { string } device - Indicates specified remote device. 7909 * @param { string } table - Indicates the target table. 7910 * @param { RdbPredicates } predicates - 7911 * The specified remote remote query condition by the instance object of {@link RdbPredicates}. 7912 * @param { Array<string> } columns - The columns to remote query. 7913 * If the value is empty array, the remote query applies to all columns. 7914 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 7915 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7916 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7917 * @throws { BusinessError } 801 - Capability not supported. 7918 * @throws { BusinessError } 14800000 - Inner error. 7919 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7920 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7921 * @since 12 7922 */ 7923 remoteQuery(device: string, table: string, predicates: RdbPredicates, columns: Array<string>): Promise<ResultSet>; 7924 7925 /** 7926 * Subscribes to data changes of this RDB store. 7927 * The registered callback will be called when data in a distributed RDB store changes. 7928 * 7929 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 7930 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 7931 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7932 * @param { Callback<Array<string>> } observer - 7933 * {Array<string>}: the observer of data change events in the distributed database. 7934 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7935 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7936 * @throws { BusinessError } 801 - Capability not supported. 7937 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7938 * @since 9 7939 */ 7940 /** 7941 * Subscribes to data changes of this RDB store. 7942 * The registered callback will be called when data in a distributed RDB store changes. 7943 * the callback will be invoked. 7944 * 7945 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 7946 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 7947 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7948 * @param { Callback<Array<string>> } observer - 7949 * {Array<string>}: the observer of data change events in the distributed database. 7950 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7951 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7952 * @throws { BusinessError } 801 - Capability not supported. 7953 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7954 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7955 * @since 12 7956 */ 7957 on(event: 'dataChange', type: SubscribeType, observer: Callback<Array<string>>): void; 7958 7959 /** 7960 * Subscribes to data changes of this RDB store. 7961 * The registered callback will be called when data in a distributed RDB store changes. 7962 * 7963 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 7964 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 7965 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7966 * If its value is SUBSCRIBE_TYPE_LOCAL_DETAILS, 7967 * the callback will be invoked for data changes in the local database. 7968 * @param { Callback<Array<string>> | Callback<Array<ChangeInfo>> } observer 7969 * {Array<string>}: The observer of data change events in the distributed database. 7970 * {Array<ChangeInfo>}: The change info of data change events in the distributed database or the local database. 7971 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7972 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7973 * @throws { BusinessError } 202 - Permission verification failed, 7974 * application which is not a system application uses system API. 7975 * @throws { BusinessError } 801 - Capability not supported. 7976 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7977 * @since 10 7978 */ 7979 /** 7980 * Subscribes to data changes of this RDB store. 7981 * The registered callback will be called when data in a distributed RDB store changes. 7982 * 7983 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 7984 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 7985 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7986 * @param { Callback<Array<string>> | Callback<Array<ChangeInfo>> } observer 7987 * {Array<string>}: The observer of data change events in the distributed database. 7988 * {Array<ChangeInfo>}: The change info of data change events in the distributed database. 7989 * @throws { BusinessError } 202 - Permission verification failed, 7990 * application which is not a system application uses system API. 7991 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7992 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 7993 * @throws { BusinessError } 801 - Capability not supported. 7994 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 7995 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7996 * @since 12 7997 */ 7998 on(event: 'dataChange', type: SubscribeType, observer: Callback<Array<string>> | Callback<Array<ChangeInfo>>): void; 7999 8000 /** 8001 * Registers an observer for the database. 8002 * 8003 * @param { string } event - Event type, which must match the event type in {@link emit}. 8004 * @param { boolean } interProcess - 8005 * Indicates whether it is an interprocess subscription or an in-process subscription. 8006 * @param { Callback<void> } observer - The observer of data change events in the database. 8007 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8008 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8009 * @throws { BusinessError } 801 - Capability not supported. 8010 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 8011 * @throws { BusinessError } 14800000 - Inner error. 8012 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8013 * @since 10 8014 */ 8015 /** 8016 * Registers an observer for the database. 8017 * 8018 * @param { string } event - Event type, which must match the event type in {@link emit}. 8019 * @param { boolean } interProcess - 8020 * Indicates whether it is an interprocess subscription or an in-process subscription. 8021 * @param { Callback<void> } observer - The observer of data change events in the database. 8022 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8023 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8024 * @throws { BusinessError } 801 - Capability not supported. 8025 * @throws { BusinessError } 14800000 - Inner error. 8026 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8027 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 8028 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8029 * @since 12 8030 */ 8031 on(event: string, interProcess: boolean, observer: Callback<void>): void; 8032 8033 /** 8034 * Register an automatic synchronization callback to the database. 8035 * 8036 * @param { 'autoSyncProgress' } event - Indicates the event must be string 'autoSyncProgress'. 8037 * @param { Callback<ProgressDetails> } progress - 8038 * Callback used to return the {@link ProgressDetails} result. 8039 * @throws { BusinessError } 401 - Parameter error. Possible causes: 8040 * 1. Need 2 - 3 parameter(s)! 2. The RdbStore must be valid. 8041 * 3. The event must be a not empty string. 4. The progress must be function. 8042 * @throws { BusinessError } 801 - Capability not supported. 8043 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8044 * @since 11 8045 */ 8046 /** 8047 * Register an automatic synchronization callback to the database. 8048 * 8049 * @param { 'autoSyncProgress' } event - Indicates the event must be string 'autoSyncProgress'. 8050 * @param { Callback<ProgressDetails> } progress - 8051 * Callback used to return the {@link ProgressDetails} result. 8052 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8053 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8054 * @throws { BusinessError } 801 - Capability not supported. 8055 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8056 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8057 * @since 12 8058 */ 8059 on(event: 'autoSyncProgress', progress: Callback<ProgressDetails>): void; 8060 8061 /** 8062 * Subscribes to the SQL statistics. 8063 * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. 8064 * @param { Callback<SqlExecutionInfo> } observer - 8065 * Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. 8066 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8067 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8068 * @throws { BusinessError } 801 - Capability not supported. 8069 * @throws { BusinessError } 14800000 - Inner error. 8070 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8071 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8072 * @since 12 8073 */ 8074 /** 8075 * Subscribes to the SQL statistics. 8076 * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. 8077 * @param { Callback<SqlExecutionInfo> } observer - 8078 * Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. 8079 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8080 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8081 * @throws { BusinessError } 801 - Capability not supported. 8082 * @throws { BusinessError } 14800000 - Inner error. 8083 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8084 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8085 * @crossplatform 8086 * @since 20 8087 */ 8088 on(event: 'statistics', observer: Callback<SqlExecutionInfo> ): void; 8089 8090 /** 8091 * Subscribes to the SQL execution error logs. 8092 * @param { 'sqliteErrorOccurred' } event - Event type, which must be 'sqliteErrorOccurred'. 8093 * @param { Callback<ExceptionMessage> } observer - Callback used to return the SQL execution error log {@link ExceptionMessage}. 8094 * @throws { BusinessError } 801 - Capability not supported. 8095 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8096 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8097 * @crossplatform 8098 * @since 20 8099 */ 8100 on(event: 'sqliteErrorOccurred', observer: Callback<ExceptionMessage> ): void; 8101 8102 /** 8103 * Subscribes to the SQL performance statistics. 8104 * @param { 'perfStat' } event - Event type, which must be 'perfStat'. 8105 * @param { Callback<SqlExecutionInfo> } observer - Callback used to return the SQL execution statistics {@link SqlExecutionInfo}. 8106 * @throws { BusinessError } 801 - Capability not supported. 8107 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8108 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8109 * @crossplatform 8110 * @since 20 8111 */ 8112 on(event: 'perfStat', observer: Callback<SqlExecutionInfo>): void; 8113 8114 /** 8115 * Remove specified observer of specified type from the database. 8116 * 8117 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 8118 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 8119 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 8120 * @param { Callback<Array<string>> } observer - {Array<string>}: the data change observer already registered. 8121 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8122 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8123 * @throws { BusinessError } 801 - Capability not supported. 8124 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8125 * @since 9 8126 */ 8127 /** 8128 * Remove specified observer of specified type from the database. 8129 * 8130 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 8131 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 8132 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 8133 * @param { Callback<Array<string>> } observer - {Array<string>}: the data change observer already registered. 8134 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8135 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8136 * @throws { BusinessError } 801 - Capability not supported. 8137 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8138 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8139 * @since 12 8140 */ 8141 off(event: 'dataChange', type: SubscribeType, observer: Callback<Array<string>>): void; 8142 8143 /** 8144 * Remove specified observer of specified type from the database. 8145 * 8146 * @param { 'dataChange' } event - indicates the event must be string 'dataChange'. 8147 * @param { SubscribeType } type - indicates the subscription type, which is defined in {@link SubscribeType}. 8148 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 8149 * @param { Callback<Array<string>> | Callback<Array<ChangeInfo>> } observer - 8150 * {Array<string>}: the data change observer already registered. 8151 * {Array<ChangeInfo>}: the change info already registered. 8152 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8153 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8154 * @throws { BusinessError } 202 - Permission verification failed, 8155 * application which is not a system application uses system API. 8156 * @throws { BusinessError } 801 - Capability not supported. 8157 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8158 * @since 10 8159 */ 8160 /** 8161 * Remove specified observer of specified type from the database. 8162 * 8163 * @param { 'dataChange' } event - indicates the event must be string 'dataChange'. 8164 * @param { SubscribeType } type - indicates the subscription type, which is defined in {@link SubscribeType}. 8165 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 8166 * @param { Callback<Array<string>> | Callback<Array<ChangeInfo>> } observer - 8167 * {Array<string>}: the data change observer already registered. 8168 * {Array<ChangeInfo>}: the change info already registered. 8169 * @throws { BusinessError } 202 - Permission verification failed, 8170 * application which is not a system application uses system API. 8171 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8172 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8173 * @throws { BusinessError } 801 - Capability not supported. 8174 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8175 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8176 * @since 12 8177 */ 8178 off( 8179 event: 'dataChange', 8180 type: SubscribeType, 8181 observer?: Callback<Array<string>> | Callback<Array<ChangeInfo>> 8182 ): void; 8183 8184 /** 8185 * Remove specified observer of specified type from the database. 8186 * 8187 * @param { string } event - Indicates the subscription event. 8188 * @param { boolean } interProcess - 8189 * Indicates whether it is an interprocess subscription or an in-process subscription. 8190 * @param { Callback<void> } observer - The data change observer already registered. 8191 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8192 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8193 * @throws { BusinessError } 801 - Capability not supported. 8194 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 8195 * @throws { BusinessError } 14800000 - Inner error. 8196 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8197 * @since 10 8198 */ 8199 /** 8200 * Remove specified observer of specified type from the database. 8201 * 8202 * @param { string } event - Indicates the subscription event. 8203 * @param { boolean } interProcess - 8204 * Indicates whether it is an interprocess subscription or an in-process subscription. 8205 * @param { Callback<void> } observer - The data change observer already registered. 8206 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8207 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8208 * @throws { BusinessError } 801 - Capability not supported. 8209 * @throws { BusinessError } 14800000 - Inner error. 8210 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8211 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 8212 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8213 * @since 12 8214 */ 8215 off(event: string, interProcess: boolean, observer?: Callback<void>): void; 8216 8217 /** 8218 * Unregister the database auto synchronization callback. 8219 * 8220 * @param { 'autoSyncProgress' } event - indicates the event must be string 'autoSyncProgress'. 8221 * @param { Callback<ProgressDetails> } progress - 8222 * Callback used to return the {@link ProgressDetails} result. 8223 * @throws { BusinessError } 401 - Parameter error. Possible causes: 8224 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be valid. 8225 * 3. The event must be a not empty string. 4. The progress must be function. 8226 * @throws { BusinessError } 801 - Capability not supported. 8227 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8228 * @since 11 8229 */ 8230 /** 8231 * Unregister the database auto synchronization callback. 8232 * 8233 * @param { 'autoSyncProgress' } event - indicates the event must be string 'autoSyncProgress'. 8234 * @param { Callback<ProgressDetails> } progress - 8235 * Callback used to return the {@link ProgressDetails} result. 8236 * @throws { BusinessError } 401 - Parameter error. Possible causes: 8237 * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be valid. 8238 * 3. The event must be a not empty string. 4. The progress must be function. 8239 * @throws { BusinessError } 801 - Capability not supported. 8240 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8241 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8242 * @since 12 8243 */ 8244 off(event: 'autoSyncProgress', progress?: Callback<ProgressDetails>): void; 8245 8246 /** 8247 * Unsubscribes from the SQL statistics. 8248 * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. 8249 * @param { Callback<SqlExecutionInfo> } observer - Indicates the callback to unregister. 8250 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8251 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8252 * @throws { BusinessError } 801 - Capability not supported. 8253 * @throws { BusinessError } 14800000 - Inner error. 8254 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8255 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8256 * @since 12 8257 */ 8258 /** 8259 * Unsubscribes from the SQL statistics. 8260 * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. 8261 * @param { Callback<SqlExecutionInfo> } observer - Indicates the callback to unregister. 8262 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8263 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8264 * @throws { BusinessError } 801 - Capability not supported. 8265 * @throws { BusinessError } 14800000 - Inner error. 8266 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8267 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8268 * @crossplatform 8269 * @since 20 8270 */ 8271 off(event: 'statistics', observer?: Callback<SqlExecutionInfo> ): void; 8272 8273 /** 8274 * Unsubscribes from the SQL execution error logs. 8275 * @param { 'sqliteErrorOccurred' } event - Indicates the event type, which must be 'sqliteErrorOccurred'. 8276 * @param { Callback<ExceptionMessage> } observer - Callback to unregister. 8277 * @throws { BusinessError } 801 - Capability not supported. 8278 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8279 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8280 * @crossplatform 8281 * @since 20 8282 */ 8283 off(event: 'sqliteErrorOccurred', observer?: Callback<ExceptionMessage> ): void; 8284 8285 /** 8286 * Unsubscribes from the SQL performance statistics. 8287 * @param { 'perfStat' } event - Event type, which must be 'perfStat'. 8288 * @param { Callback<SqlExecutionInfo> } observer - Callback to unregister. 8289 * @throws { BusinessError } 801 - Capability not supported. 8290 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8291 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8292 * @crossplatform 8293 * @since 20 8294 */ 8295 off(event: 'perfStat', observer?: Callback<SqlExecutionInfo>): void; 8296 8297 /** 8298 * Notifies the registered observers of a change to the data resource specified by Uri. 8299 * 8300 * @param { string } event - Indicates the subscription event. 8301 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8302 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8303 * @throws { BusinessError } 801 - Capability not supported. 8304 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 8305 * @throws { BusinessError } 14800000 - Inner error. 8306 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8307 * @since 10 8308 */ 8309 /** 8310 * Notifies the registered observers of a change to the data resource specified by Uri. 8311 * 8312 * @param { string } event - Indicates the subscription event. 8313 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8314 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8315 * @throws { BusinessError } 801 - Capability not supported. 8316 * @throws { BusinessError } 14800000 - Inner error. 8317 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8318 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 8319 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8320 * @since 12 8321 */ 8322 emit(event: string): void; 8323 8324 /** 8325 * Close the RdbStore and all resultSets. 8326 * 8327 * @returns { Promise<void> } The promise returned by the function. 8328 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 8329 * @throws { BusinessError } 14800000 - Inner error. 8330 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8331 * @since 12 8332 */ 8333 /** 8334 * Close the RdbStore and all resultSets. 8335 * 8336 * @returns { Promise<void> } The promise returned by the function. 8337 * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. 8338 * @throws { BusinessError } 14800000 - Inner error. 8339 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8340 * @crossplatform 8341 * @since 20 8342 */ 8343 close(): Promise<void>; 8344 8345 /** 8346 * Attaches a database file to the currently linked database. 8347 * 8348 * @param { string } fullPath - Indicates the path of the database file to attach. 8349 * @param { string } attachName - Indicates the alias of the database. 8350 * @param { number } waitTime - Indicates the maximum time allowed for attaching the database file. 8351 * @returns { Promise<number> } Promise used to return the number of attached databases. 8352 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8353 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8354 * @throws { BusinessError } 801 - Capability not supported. 8355 * @throws { BusinessError } 14800000 - Inner error. 8356 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 8357 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8358 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8359 * @throws { BusinessError } 14800015 - The database does not respond. 8360 * @throws { BusinessError } 14800016 - The database alias already exists. 8361 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8362 * Possible causes: Insert failed or the updated data does not exist. 8363 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8364 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8365 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8366 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8367 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8368 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8369 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8370 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8371 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8372 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8373 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 8374 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8375 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 8376 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8377 * @since 12 8378 */ 8379 attach(fullPath: string, attachName: string, waitTime?: number) : Promise<number>; 8380 8381 /** 8382 * Attaches a database file to the currently linked database. 8383 * 8384 * @param { Context } context - Indicates the context of an application or ability. 8385 * @param { StoreConfig } config - 8386 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8387 * @param { string } attachName - Indicates the alias of the database. 8388 * @param { number } waitTime - Indicates the maximum time allowed for attaching the database file. 8389 * @returns { Promise<number> } Promise used to return the number of attached databases. 8390 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8391 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8392 * @throws { BusinessError } 801 - Capability not supported. 8393 * @throws { BusinessError } 14800000 - Inner error. 8394 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 8395 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8396 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8397 * @throws { BusinessError } 14800015 - The database does not respond. 8398 * @throws { BusinessError } 14800016 - The database alias already exists. 8399 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 8400 * @throws { BusinessError } 14801002 - Invalid data group ID. 8401 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8402 * Possible causes: Insert failed or the updated data does not exist. 8403 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8404 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8405 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8406 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8407 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8408 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8409 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8410 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8411 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8412 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8413 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 8414 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8415 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 8416 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8417 * @since 12 8418 */ 8419 attach(context: Context, config: StoreConfig, attachName: string, waitTime?: number) : Promise<number>; 8420 8421 /** 8422 * Detaches a database from this database. 8423 * 8424 * @param { string } attachName - Indicates the alias of the database. 8425 * @param { number } waitTime - Indicates the maximum time allowed for detaching the database. 8426 * @returns { Promise<number> } Return the current number of attached databases. 8427 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8428 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8429 * @throws { BusinessError } 14800000 - Inner error. 8430 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8431 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8432 * @throws { BusinessError } 14800015 - The database does not respond. 8433 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8434 * Possible causes: Insert failed or the updated data does not exist. 8435 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8436 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8437 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8438 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8439 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8440 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8441 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8442 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8443 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8444 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8445 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 8446 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8447 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 8448 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8449 * @since 12 8450 */ 8451 detach(attachName: string, waitTime?: number) : Promise<number>; 8452 8453 /** 8454 * Locks data from the database based on a specified instance object of RdbPredicates. 8455 * 8456 * @param { RdbPredicates } predicates - 8457 * The specified lock condition by the instance object of {@link RdbPredicates}. 8458 * @returns { Promise<void> } The promise returned by the function. 8459 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8460 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8461 * @throws { BusinessError } 14800000 - Inner error. 8462 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8463 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8464 * @throws { BusinessError } 14800015 - The database does not respond. 8465 * @throws { BusinessError } 14800018 - No data meets the condition. 8466 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8467 * Possible causes: Insert failed or the updated data does not exist. 8468 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8469 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8470 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8471 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8472 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8473 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8474 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8475 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8476 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8477 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8478 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 8479 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8480 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 8481 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8482 * @crossplatform 8483 * @since 12 8484 */ 8485 lockRow(predicates: RdbPredicates): Promise<void>; 8486 8487 /** 8488 * Unlocks data from the database based on a specified instance object of RdbPredicates. 8489 * 8490 * @param { RdbPredicates } predicates - 8491 * The specified Unlock condition by the instance object of {@link RdbPredicates}. 8492 * @returns { Promise<void> } The promise returned by the function. 8493 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8494 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8495 * @throws { BusinessError } 14800000 - Inner error. 8496 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8497 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8498 * @throws { BusinessError } 14800015 - The database does not respond. 8499 * @throws { BusinessError } 14800018 - No data meets the condition. 8500 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8501 * Possible causes: Insert failed or the updated data does not exist. 8502 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8503 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8504 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8505 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8506 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8507 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8508 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8509 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8510 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8511 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8512 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 8513 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8514 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 8515 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8516 * @crossplatform 8517 * @since 12 8518 */ 8519 unlockRow(predicates: RdbPredicates): Promise<void>; 8520 8521 /** 8522 * Queries locked data in the database based on specified conditions. 8523 * 8524 * @param { RdbPredicates } predicates - 8525 * The specified query condition by the instance object of {@link RdbPredicates}. 8526 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 8527 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 8528 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8529 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8530 * @throws { BusinessError } 14800000 - Inner error. 8531 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8532 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8533 * @throws { BusinessError } 14800015 - The database does not respond. 8534 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8535 * Possible causes: Insert failed or the updated data does not exist. 8536 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8537 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8538 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8539 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8540 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8541 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8542 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8543 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8544 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8545 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8546 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 8547 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8548 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 8549 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8550 * @crossplatform 8551 * @since 12 8552 */ 8553 queryLockedRow(predicates: RdbPredicates, columns?: Array<string>): Promise<ResultSet>; 8554 8555 /** 8556 * Lock cloud container before non-auto cloud sync. 8557 * 8558 * @returns { Promise<number> } The expired time of the lock. 8559 * @throws { BusinessError } 202 - Permission verification failed, 8560 * application which is not a system application uses system API. 8561 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8562 * @systemapi 8563 * @since 12 8564 */ 8565 lockCloudContainer(): Promise<number>; 8566 8567 /** 8568 * Unlock cloud container. 8569 * 8570 * @returns { Promise<void> } The promise returned by the function. 8571 * @throws { BusinessError } 202 - Permission verification failed, 8572 * application which is not a system application uses system API. 8573 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8574 * @systemapi 8575 * @since 12 8576 */ 8577 unlockCloudContainer(): Promise<void>; 8578 8579 /** 8580 * create a transaction instance and begin. 8581 * 8582 * @param { TransactionOptions } options - The option for creating transactions. 8583 * @returns { Promise<Transaction> } The {@link Transaction} object if the operation is successful. 8584 * @throws { BusinessError } 14800000 - Inner error. 8585 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8586 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8587 * @throws { BusinessError } 14800015 - The database is busy. 8588 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8589 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8590 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8591 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8592 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8593 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8594 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8595 * @crossplatform 8596 * @since 14 8597 */ 8598 createTransaction(options?: TransactionOptions): Promise<Transaction>; 8599 8600 /** 8601 * Changes the key used to encrypt the database. 8602 * 8603 * @param { CryptoParam } cryptoParam - Specifies the crypto parameters used to rekey. 8604 * If valid cryptoParam passed, the cryptoParam is used to rekey. 8605 * If cryptoParam is null or not passed, the default cryptoParam is used. 8606 * @returns { Promise<void> } - Promise that returns no value. 8607 * @throws { BusinessError } 801 - Capability not supported. 8608 * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. 8609 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8610 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8611 * @throws { BusinessError } 14800015 - The database does not respond. 8612 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8613 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8614 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8615 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8616 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8617 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8618 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8619 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8620 * @crossplatform 8621 * @since 20 8622 */ 8623 rekey(cryptoParam?: CryptoParam): Promise<void>; 8624 8625 /** 8626 * Support for collations in different languages. 8627 * @param { string } locale - Language related to the locale. 8628 * for example, zh. The value complies with the ISO 639 standard. 8629 * @returns { Promise<void> } The promise returned by the function. 8630 * @throws { BusinessError } 801 - Capability not supported. 8631 * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. 8632 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8633 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8634 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8635 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 8636 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8637 * @since 20 8638 */ 8639 setLocale(locale: string) : Promise<void> 8640 } 8641 8642 /** 8643 * Provides transactional methods for managing the relational database (RDB). 8644 * 8645 * @interface Transaction 8646 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8647 * @crossplatform 8648 * @since 14 8649 */ 8650 interface Transaction { 8651 /** 8652 * commit the transaction. 8653 * 8654 * @returns { Promise<void> } Promise used to return the result. 8655 * @throws { BusinessError } 14800000 - Inner error. 8656 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8657 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8658 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8659 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8660 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8661 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8662 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8663 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8664 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8665 * @crossplatform 8666 * @since 14 8667 */ 8668 commit(): Promise<void>; 8669 8670 /** 8671 * rollback the transaction. 8672 * 8673 * @returns { Promise<void> } Promise used to return the result. 8674 * @throws { BusinessError } 14800000 - Inner error. 8675 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8676 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8677 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8678 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8679 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8680 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8681 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8682 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8683 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8684 * @crossplatform 8685 * @since 14 8686 */ 8687 rollback(): Promise<void>; 8688 8689 /** 8690 * Inserts a row of data into the target table. 8691 * 8692 * @param { string } table - Indicates the target table. 8693 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 8694 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 8695 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 8696 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8697 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8698 * @throws { BusinessError } 14800000 - Inner error. 8699 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8700 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8701 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8702 * Possible causes: Insert failed or the updated data does not exist. 8703 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8704 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8705 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8706 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8707 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8708 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8709 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8710 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8711 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8712 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8713 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8714 * @crossplatform 8715 * @since 14 8716 */ 8717 insert(table: string, values: ValuesBucket, conflict?: ConflictResolution): Promise<number>; 8718 8719 /** 8720 * Inserts a row of data into the target table with sync interface, just use in TaskPool or Worker. 8721 * 8722 * @param { string } table - Indicates the target table. 8723 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 8724 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 8725 * @returns { number } The row ID if the operation is successful. return -1 otherwise. 8726 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8727 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8728 * @throws { BusinessError } 14800000 - Inner error. 8729 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8730 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8731 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8732 * Possible causes: Insert failed or the updated data does not exist. 8733 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8734 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8735 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8736 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8737 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8738 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8739 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8740 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8741 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8742 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8743 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8744 * @crossplatform 8745 * @since 14 8746 */ 8747 insertSync(table: string, values: ValuesBucket | sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; 8748 8749 /** 8750 * Inserts a batch of data into the target table. 8751 * 8752 * @param { string } table - Indicates the target table. 8753 * @param { Array<ValuesBucket> } values - 8754 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 8755 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. 8756 * returns -1 otherwise. 8757 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8758 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8759 * @throws { BusinessError } 14800000 - Inner error. 8760 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8761 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8762 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8763 * Possible causes: Insert failed or the updated data does not exist. 8764 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8765 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8766 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8767 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8768 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8769 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8770 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8771 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8772 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8773 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8774 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8775 * @crossplatform 8776 * @since 14 8777 */ 8778 batchInsert(table: string, values: Array<ValuesBucket>): Promise<number>; 8779 8780 /** 8781 * Inserts a batch of data into the target table. 8782 * 8783 * @param { string } table - Indicates the target table. 8784 * @param { Array<ValuesBucket> } values - 8785 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 8786 * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. 8787 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8788 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8789 * @throws { BusinessError } 14800000 - Inner error. 8790 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8791 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8792 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8793 * Possible causes: Insert failed or the updated data does not exist. 8794 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8795 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8796 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8797 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8798 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8799 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8800 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8801 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8802 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8803 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8804 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8805 * @crossplatform 8806 * @since 14 8807 */ 8808 batchInsertSync(table: string, values: Array<ValuesBucket>): number; 8809 8810 /** 8811 * Inserts a batch of data into the target table. 8812 * 8813 * @param { string } table - Indicates the target table. 8814 * @param { Array<ValuesBucket> } values - 8815 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 8816 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 8817 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. 8818 * returns -1 otherwise. 8819 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8820 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8821 * @throws { BusinessError } 14800000 - Inner error. 8822 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8823 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8824 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8825 * Possible causes: Insert failed or the updated data does not exist. 8826 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8827 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8828 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8829 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8830 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8831 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8832 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8833 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8834 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8835 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 8836 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8837 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 8838 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8839 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8840 * @crossplatform 8841 * @since 18 8842 */ 8843 batchInsertWithConflictResolution(table: string, values: Array<ValuesBucket>, conflict: ConflictResolution): Promise<number>; 8844 8845 /** 8846 * Inserts a batch of data into the target table. 8847 * 8848 * @param { string } table - Indicates the target table. 8849 * @param { Array<ValuesBucket> } values - 8850 * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 8851 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 8852 * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. 8853 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8854 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8855 * @throws { BusinessError } 14800000 - Inner error. 8856 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8857 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8858 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8859 * Possible causes: Insert failed or the updated data does not exist. 8860 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8861 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8862 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8863 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8864 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8865 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8866 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8867 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8868 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8869 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 8870 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8871 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 8872 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8873 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8874 * @crossplatform 8875 * @since 18 8876 */ 8877 batchInsertWithConflictResolutionSync(table: string, values: Array<ValuesBucket>, conflict: ConflictResolution): number; 8878 8879 /** 8880 * Updates data in the database based on a specified instance object of RdbPredicates. 8881 * 8882 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 8883 * The key-value pairs are associated with column names of the database table. 8884 * @param { RdbPredicates } predicates - 8885 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 8886 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 8887 * @returns { Promise<number> } The number of affected rows. 8888 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8889 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8890 * @throws { BusinessError } 14800000 - Inner error. 8891 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8892 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8893 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8894 * Possible causes: Insert failed or the updated data does not exist. 8895 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8896 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8897 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8898 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8899 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8900 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8901 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8902 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8903 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8904 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8905 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8906 * @crossplatform 8907 * @since 14 8908 */ 8909 update(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): Promise<number>; 8910 8911 /** 8912 * Updates data in the database based on a specified instance object of RdbPredicates with sync interface. 8913 * 8914 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 8915 * The key-value pairs are associated with column names of the database table. 8916 * @param { RdbPredicates } predicates - 8917 * Indicates the specified update condition by the instance object of {@link RdbPredicates}. 8918 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 8919 * @returns { number } The number of affected rows. 8920 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8921 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8922 * @throws { BusinessError } 14800000 - Inner error. 8923 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8924 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8925 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8926 * Possible causes: Insert failed or the updated data does not exist. 8927 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8928 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8929 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8930 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8931 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8932 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8933 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8934 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8935 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8936 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8937 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8938 * @crossplatform 8939 * @since 14 8940 */ 8941 updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number; 8942 8943 /** 8944 * Deletes data from the database based on a specified instance object of RdbPredicates. 8945 * 8946 * @param { RdbPredicates } predicates - 8947 * The specified delete condition by the instance object of {@link RdbPredicates}. 8948 * @returns { Promise<number> } return the number of affected rows. 8949 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8950 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8951 * @throws { BusinessError } 14800000 - Inner error. 8952 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8953 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8954 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8955 * Possible causes: Insert failed or the updated data does not exist. 8956 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8957 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8958 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8959 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8960 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8961 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8962 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8963 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8964 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8965 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8966 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8967 * @crossplatform 8968 * @since 14 8969 */ 8970 delete(predicates: RdbPredicates): Promise<number>; 8971 8972 /** 8973 * Deletes data from the database based on a specified instance object of RdbPredicates with sync interface. 8974 * 8975 * @param { RdbPredicates } predicates - 8976 * The specified delete condition by the instance object of {@link RdbPredicates}. 8977 * @returns { number } return the number of rows deleted. 8978 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8979 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 8980 * @throws { BusinessError } 14800000 - Inner error. 8981 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 8982 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 8983 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8984 * Possible causes: Insert failed or the updated data does not exist. 8985 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8986 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8987 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8988 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8989 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8990 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8991 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8992 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8993 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8994 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8995 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8996 * @crossplatform 8997 * @since 14 8998 */ 8999 deleteSync(predicates: RdbPredicates): number; 9000 9001 /** 9002 * Queries data in the database based on specified conditions. 9003 * 9004 * @param { RdbPredicates } predicates - 9005 * The specified query condition by the instance object of {@link RdbPredicates}. 9006 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 9007 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 9008 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9009 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9010 * @throws { BusinessError } 14800000 - Inner error. 9011 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9012 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 9013 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9014 * Possible causes: Insert failed or the updated data does not exist. 9015 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 9016 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 9017 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 9018 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9019 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 9020 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9021 * @crossplatform 9022 * @since 14 9023 */ 9024 query(predicates: RdbPredicates, columns?: Array<string>): Promise<ResultSet>; 9025 9026 /** 9027 * Queries data in the database based on specified conditions with sync function. 9028 * 9029 * @param { RdbPredicates } predicates - 9030 * The specified query condition by the instance object of {@link RdbPredicates}. 9031 * @param { Array<string> } columns - 9032 * The columns to query. If the value is empty array, the query applies to all columns. 9033 * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. 9034 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9035 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9036 * @throws { BusinessError } 14800000 - Inner error. 9037 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9038 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 9039 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9040 * Possible causes: Insert failed or the updated data does not exist. 9041 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 9042 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 9043 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 9044 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 9045 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9046 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 9047 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9048 * @crossplatform 9049 * @since 14 9050 */ 9051 querySync(predicates: RdbPredicates, columns?: Array<string>): ResultSet; 9052 9053 /** 9054 * Queries data in the database based on SQL statement. 9055 * 9056 * @param { string } sql - Indicates the SQL statement to execute. 9057 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. 9058 * The values are strings. 9059 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 9060 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9061 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9062 * @throws { BusinessError } 14800000 - Inner error. 9063 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9064 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 9065 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9066 * Possible causes: Insert failed or the updated data does not exist. 9067 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 9068 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 9069 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 9070 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 9071 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9072 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 9073 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9074 * @crossplatform 9075 * @since 14 9076 */ 9077 querySql(sql: string, args?: Array<ValueType>): Promise<ResultSet>; 9078 9079 /** 9080 * Queries data in the database based on SQL statement with sync interface. 9081 * 9082 * @param { string } sql - Indicates the SQL statement to execute. 9083 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. 9084 * The values are strings. 9085 * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. 9086 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9087 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9088 * @throws { BusinessError } 14800000 - Inner error. 9089 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9090 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 9091 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9092 * Possible causes: Insert failed or the updated data does not exist. 9093 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 9094 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 9095 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 9096 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 9097 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9098 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 9099 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9100 * @crossplatform 9101 * @since 14 9102 */ 9103 querySqlSync(sql: string, args?: Array<ValueType>): ResultSet; 9104 9105 /** 9106 * Executes a SQL statement that contains specified parameters and returns a value of ValueType. 9107 * 9108 * @param { string } sql - Indicates the SQL statement to execute. 9109 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. 9110 * The values are strings. 9111 * @returns { Promise<ValueType> } The promise returned by the function. 9112 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9113 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9114 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 9115 * @throws { BusinessError } 14800000 - Inner error. 9116 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9117 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 9118 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9119 * Possible causes: Insert failed or the updated data does not exist. 9120 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 9121 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 9122 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 9123 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 9124 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 9125 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9126 * @throws { BusinessError } 14800029 - SQLite: The database is full. 9127 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 9128 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 9129 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 9130 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9131 * @since 14 9132 */ 9133 /** 9134 * Executes a SQL statement that contains specified parameters and returns a value of ValueType. 9135 * 9136 * @param { string } sql - Indicates the SQL statement to execute. 9137 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. 9138 * The values are strings. 9139 * @returns { Promise<ValueType> } The promise returned by the function. 9140 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9141 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9142 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 9143 * @throws { BusinessError } 14800000 - Inner error. 9144 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9145 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 9146 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9147 * Possible causes: Insert failed or the updated data does not exist. 9148 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 9149 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 9150 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 9151 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 9152 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 9153 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9154 * @throws { BusinessError } 14800029 - SQLite: The database is full. 9155 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 9156 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 9157 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 9158 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9159 * @crossplatform 9160 * @since 20 9161 */ 9162 execute(sql: string, args?: Array<ValueType>): Promise<ValueType>; 9163 9164 /** 9165 * Executes a SQL statement that contains specified parameters and returns a value of ValueType with sync interface. 9166 * 9167 * @param { string } sql - Indicates the SQL statement to execute. 9168 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. 9169 * The values are strings. 9170 * @returns { ValueType } The promise returned by the function. 9171 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9172 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9173 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 9174 * @throws { BusinessError } 14800000 - Inner error. 9175 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9176 * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. 9177 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9178 * Possible causes: Insert failed or the updated data does not exist. 9179 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 9180 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 9181 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 9182 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 9183 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 9184 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9185 * @throws { BusinessError } 14800029 - SQLite: The database is full. 9186 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 9187 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 9188 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 9189 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9190 * @crossplatform 9191 * @since 14 9192 */ 9193 executeSync(sql: string, args?: Array<ValueType>): ValueType; 9194 } 9195 9196 /** 9197 * Obtains a RDB store. 9198 * You can set parameters of the RDB store as required. In general, this method is recommended 9199 * to obtain a rdb store. 9200 * 9201 * @param { Context } context - Indicates the context of an application or ability. 9202 * @param { StoreConfig } config - 9203 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9204 * @param { AsyncCallback<RdbStore> } callback - The RDB store {@link RdbStore}. 9205 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9206 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9207 * @throws { BusinessError } 14800000 - Inner error. 9208 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9209 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9210 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9211 * @since 9 9212 */ 9213 /** 9214 * Obtains a RDB store. 9215 * You can set parameters of the RDB store as required. In general, this method is recommended 9216 * to obtain a rdb store. 9217 * 9218 * @param { Context } context - Indicates the context of an application or ability. 9219 * @param { StoreConfig } config - 9220 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9221 * @param { AsyncCallback<RdbStore> } callback - The RDB store {@link RdbStore}. 9222 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9223 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9224 * @throws { BusinessError } 14800000 - Inner error. 9225 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9226 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9227 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 9228 * @throws { BusinessError } 14801002 - Invalid data group ID. 9229 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9230 * @crossplatform 9231 * @since 10 9232 */ 9233 /** 9234 * Obtains a RDB store. 9235 * You can set parameters of the RDB store as required. In general, this method is recommended 9236 * to obtain a rdb store. 9237 * 9238 * @param { Context } context - Indicates the context of an application or ability. 9239 * @param { StoreConfig } config - 9240 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9241 * @param { AsyncCallback<RdbStore> } callback - The RDB store {@link RdbStore}. 9242 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9243 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9244 * @throws { BusinessError } 14800000 - Inner error. 9245 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9246 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9247 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 9248 * @throws { BusinessError } 14801002 - Invalid data group ID. 9249 * @throws { BusinessError } 14800017 - StoreConfig is changed. 9250 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9251 * Possible causes: Insert failed or the updated data does not exist. 9252 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 9253 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 9254 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 9255 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9256 * @throws { BusinessError } 14800029 - SQLite: The database is full. 9257 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 9258 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9259 * @crossplatform 9260 * @since 12 9261 */ 9262 /** 9263 * Obtains a RDB store. 9264 * You can set parameters of the RDB store as required. In general, this method is recommended 9265 * to obtain a rdb store. 9266 * 9267 * @param { Context } context - Indicates the context of an application or ability. 9268 * @param { StoreConfig } config - 9269 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9270 * @param { AsyncCallback<RdbStore> } callback - The RDB store {@link RdbStore}. 9271 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9272 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9273 * @throws { BusinessError } 14800000 - Inner error. 9274 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9275 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9276 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 9277 * @throws { BusinessError } 14801002 - Invalid data group ID. 9278 * @throws { BusinessError } 14800017 - StoreConfig is changed. 9279 * @throws { BusinessError } 14800020 - The secret key is corrupted or lost. 9280 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9281 * Possible causes: Insert failed or the updated data does not exist. 9282 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 9283 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 9284 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 9285 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9286 * @throws { BusinessError } 14800029 - SQLite: The database is full. 9287 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 9288 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9289 * @crossplatform 9290 * @since arkts {'1.1':'14', '1.2':'20'} 9291 * @arkts 1.1&1.2 9292 */ 9293 function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback<RdbStore>): void; 9294 9295 /** 9296 * Obtains a RDB store. 9297 * You can set parameters of the RDB store as required. In general, this method is recommended 9298 * to obtain a rdb store. 9299 * 9300 * @param { Context } context - Indicates the context of an application or ability. 9301 * @param { StoreConfig } config - 9302 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9303 * @returns { Promise<RdbStore> } The RDB store {@link RdbStore}. 9304 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9305 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9306 * @throws { BusinessError } 14800000 - Inner error. 9307 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9308 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9309 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9310 * @since 9 9311 */ 9312 /** 9313 * Obtains a RDB store. 9314 * You can set parameters of the RDB store as required. In general, this method is recommended 9315 * to obtain a rdb store. 9316 * 9317 * @param { Context } context - Indicates the context of an application or ability. 9318 * @param { StoreConfig } config - 9319 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9320 * @returns { Promise<RdbStore> } The RDB store {@link RdbStore}. 9321 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9322 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9323 * @throws { BusinessError } 14800000 - Inner error. 9324 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9325 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9326 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 9327 * @throws { BusinessError } 14801002 - Invalid data group ID. 9328 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9329 * @crossplatform 9330 * @since 10 9331 */ 9332 /** 9333 * Obtains a RDB store. 9334 * You can set parameters of the RDB store as required. In general, this method is recommended 9335 * to obtain a rdb store. 9336 * 9337 * @param { Context } context - Indicates the context of an application or ability. 9338 * @param { StoreConfig } config - 9339 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9340 * @returns { Promise<RdbStore> } Promise used to return the **RdbStore** object obtained. 9341 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9342 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9343 * @throws { BusinessError } 14800000 - Inner error. 9344 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9345 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9346 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 9347 * @throws { BusinessError } 14801002 - Invalid data group ID. 9348 * @throws { BusinessError } 14800017 - StoreConfig is changed. 9349 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9350 * Possible causes: Insert failed or the updated data does not exist. 9351 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 9352 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9353 * @throws { BusinessError } 14800029 - SQLite: The database is full. 9354 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 9355 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9356 * @crossplatform 9357 * @since 12 9358 */ 9359 /** 9360 * Obtains a RDB store. 9361 * You can set parameters of the RDB store as required. In general, this method is recommended 9362 * to obtain a rdb store. 9363 * 9364 * @param { Context } context - Indicates the context of an application or ability. 9365 * @param { StoreConfig } config - 9366 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9367 * @returns { Promise<RdbStore> } Promise used to return the **RdbStore** object obtained. 9368 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9369 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9370 * @throws { BusinessError } 14800000 - Inner error. 9371 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9372 * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. 9373 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 9374 * @throws { BusinessError } 14801002 - Invalid data group ID. 9375 * @throws { BusinessError } 14800017 - StoreConfig is changed. 9376 * @throws { BusinessError } 14800020 - The secret key is corrupted or lost. 9377 * @throws { BusinessError } 14800021 - SQLite: Generic error. 9378 * Possible causes: Insert failed or the updated data does not exist. 9379 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 9380 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 9381 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 9382 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 9383 * @throws { BusinessError } 14800029 - SQLite: The database is full. 9384 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 9385 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9386 * @crossplatform 9387 * @since arkts {'1.1':'14', '1.2':'20'} 9388 * @arkts 1.1&1.2 9389 */ 9390 function getRdbStore(context: Context, config: StoreConfig): Promise<RdbStore>; 9391 9392 /** 9393 * Deletes the database with a specified name. 9394 * When specify custom directory, this function should not be called. 9395 * 9396 * @param { Context } context - Indicates the context of application or capability. 9397 * @param { string } name - Indicates the database name. 9398 * @param { AsyncCallback<void> } callback - The callback of deleteRdbStore. 9399 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9400 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9401 * @throws { BusinessError } 14800000 - Inner error. 9402 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9403 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9404 * @since 9 9405 */ 9406 /** 9407 * Deletes the database with a specified name. 9408 * When specify custom directory, this function should not be called. 9409 * 9410 * @param { Context } context - Indicates the context of application or capability. 9411 * @param { string } name - Indicates the database name. 9412 * @param { AsyncCallback<void> } callback - The callback of deleteRdbStore. 9413 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9414 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9415 * @throws { BusinessError } 14800000 - Inner error. 9416 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9417 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9418 * @crossplatform 9419 * @since 10 9420 */ 9421 function deleteRdbStore(context: Context, name: string, callback: AsyncCallback<void>): void; 9422 9423 /** 9424 * Deletes the database with a specified store config. 9425 * When specify custom directory, this function should be called. 9426 * 9427 * @param { Context } context - Indicates the context of an application or ability. 9428 * @param { StoreConfig } config - 9429 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9430 * @param { AsyncCallback<void> } callback - The callback of deleteRdbStore. 9431 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9432 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9433 * @throws { BusinessError } 14800000 - Inner error. 9434 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9435 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 9436 * @throws { BusinessError } 14801002 - Invalid data group ID. 9437 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9438 * @crossplatform 9439 * @since 10 9440 */ 9441 function deleteRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback<void>): void; 9442 9443 /** 9444 * Deletes the database with a specified name. 9445 * When specify custom directory, this function should not be called. 9446 * 9447 * @param { Context } context - Indicates the context of application or capability. 9448 * @param { string } name - Indicates the database name. 9449 * @returns { Promise<void> } The promise returned by the function. 9450 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9451 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9452 * @throws { BusinessError } 14800000 - Inner error. 9453 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9454 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9455 * @since 9 9456 */ 9457 /** 9458 * Deletes the database with a specified name. 9459 * When specify custom directory, this function should not be called. 9460 * 9461 * @param { Context } context - Indicates the context of application or capability. 9462 * @param { string } name - Indicates the database name. 9463 * @returns { Promise<void> } The promise returned by the function. 9464 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9465 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9466 * @throws { BusinessError } 14800000 - Inner error. 9467 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9468 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9469 * @crossplatform 9470 * @since 10 9471 */ 9472 /** 9473 * Deletes the database with a specified name. 9474 * When specify custom directory, this function should not be called. 9475 * 9476 * @param { Context } context - Indicates the context of application or capability. 9477 * @param { string } name - Indicates the database name. 9478 * @returns { Promise<void> } The promise returned by the function. 9479 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9480 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9481 * @throws { BusinessError } 14800000 - Inner error. 9482 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9483 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9484 * @crossplatform 9485 * @since 12 9486 */ 9487 function deleteRdbStore(context: Context, name: string): Promise<void>; 9488 9489 /** 9490 * Deletes the database with a specified store config. 9491 * When specify custom directory, this function should be called. 9492 * 9493 * @param { Context } context - Indicates the context of an application or ability. 9494 * @param { StoreConfig } config - 9495 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9496 * @returns { Promise<void> } The promise returned by the function. 9497 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9498 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9499 * @throws { BusinessError } 14800000 - Inner error. 9500 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9501 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 9502 * @throws { BusinessError } 14801002 - Invalid data group ID. 9503 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9504 * @crossplatform 9505 * @since 10 9506 */ 9507 /** 9508 * Deletes the database with a specified store config. 9509 * When specify custom directory, this function should be called. 9510 * 9511 * @param { Context } context - Indicates the context of an application or ability. 9512 * @param { StoreConfig } config - 9513 * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 9514 * @returns { Promise<void> } The promise returned by the function. 9515 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9516 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9517 * @throws { BusinessError } 801 - Capability not supported. 9518 * @throws { BusinessError } 14800000 - Inner error. 9519 * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. 9520 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 9521 * @throws { BusinessError } 14801002 - Invalid data group ID. 9522 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9523 * @crossplatform 9524 * @since 12 9525 */ 9526 function deleteRdbStore(context: Context, config: StoreConfig): Promise<void>; 9527 9528 /** 9529 * Checks whether the vector database is supported. 9530 * 9531 * @returns { boolean } Returns {@code true} if the vector database is supported; returns {@code false} otherwise. 9532 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9533 * @since 18 9534 */ 9535 function isVectorSupported(): boolean; 9536 9537 /** 9538 * check the {@link Tokenizer} tokenizer type is supported or not on current system. 9539 * @param { tokenizer } type - Indicates Tokenizer which want to check. 9540 * @returns { boolean } Returns {@code true} if the tokenizer is supported; returns {@code false} otherwise. 9541 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 9542 * <br>2. Incorrect parameter types; 3. Parameter verification failed. 9543 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9544 * @since 18 9545 */ 9546 function isTokenizerSupported(tokenizer: Tokenizer): boolean; 9547 9548 /** 9549 * Obtains a SQL statement used for inserting data. 9550 * 9551 * @param { string } table - Name of the target table. 9552 * @param { ValuesBucket } values - Row of data {@link ValuesBucket} to be inserted into the table. 9553 * @param { ConflictResolution } conflict - {@link ConflictResolution} to be used if conflicts occur. 9554 * @returns { SqlInfo } - Returns a SQL insert statement including parameters. 9555 * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. 9556 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9557 * @crossplatform 9558 * @since 20 9559 */ 9560 function getInsertSqlInfo(table: string, values: ValuesBucket, conflict?: ConflictResolution):SqlInfo; 9561 9562 /** 9563 * Obtains a SQL statement used for updating data. 9564 * 9565 * @param { RdbPredicates } predicates - Conditions for updating data. For details, see {@link RdbPredicates}. 9566 * @param { ValuesBucket } values - Row of data to be updated in the database. 9567 * @param { ConflictResolution } conflict - {@link ConflictResolution} to be used if conflicts occur. 9568 * @returns { SqlInfo } - Returns a SQL update statement including parameters. 9569 * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. 9570 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9571 * @crossplatform 9572 * @since 20 9573 */ 9574 function getUpdateSqlInfo(predicates: RdbPredicates, values: ValuesBucket, conflict?: ConflictResolution):SqlInfo; 9575 9576 /** 9577 * Obtains a SQL statement used for deleting data. 9578 * 9579 * @param { RdbPredicates } predicates - Conditions for deleting data. For details, see {@link RdbPredicates}. 9580 * @returns { SqlInfo } - Returns a SQL delete statement including parameters. 9581 * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. 9582 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9583 * @crossplatform 9584 * @since 20 9585 */ 9586 function getDeleteSqlInfo(predicates: RdbPredicates):SqlInfo; 9587 9588 /** 9589 * Obtains a SQL statement used for querying data. 9590 * 9591 * @param { RdbPredicates } predicates - Conditions for querying data. For details, see {@link RdbPredicates}. 9592 * @param { Array<string> } columns - Columns to query. If this parameter is not specified, the query applies to all columns. 9593 * @returns { SqlInfo } - Returns a SQL query statement including parameters. 9594 * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. 9595 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 9596 * @crossplatform 9597 * @since 20 9598 */ 9599 function getQuerySqlInfo(predicates: RdbPredicates, columns?: Array<string>):SqlInfo; 9600} 9601 9602export default relationalStore;