1/* 2 * Copyright (c) 2023 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'; 24import sendableRelationalStore from './@ohos.data.sendableRelationalStore'; 25/** 26 * Provides methods for rdbStore create and delete. 27 * 28 * @namespace relationalStore 29 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 30 * @since 9 31 */ 32/** 33 * Provides methods for rdbStore create and delete. 34 * 35 * @namespace relationalStore 36 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 37 * @crossplatform 38 * @since 10 39 */ 40declare namespace relationalStore { 41 /** 42 * Describes the status of asset 43 * 44 * @enum { number } 45 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 46 * @crossplatform 47 * @since 10 48 */ 49 enum AssetStatus { 50 /** 51 * ASSET_NORMAL: means the status of asset is normal. 52 * 53 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 54 * @crossplatform 55 * @since 10 56 */ 57 ASSET_NORMAL, 58 59 /** 60 * ASSET_ABNORMAL: means the asset needs to be inserted. 61 * 62 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 63 * @crossplatform 64 * @since 10 65 */ 66 ASSET_INSERT, 67 68 /** 69 * ASSET_ABNORMAL: means the asset needs to be updated. 70 * 71 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 72 * @crossplatform 73 * @since 10 74 */ 75 ASSET_UPDATE, 76 77 /** 78 * ASSET_ABNORMAL: means the asset needs to be deleted. 79 * 80 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 81 * @crossplatform 82 * @since 10 83 */ 84 ASSET_DELETE, 85 86 /** 87 * ASSET_ABNORMAL: means the status of asset is abnormal. 88 * 89 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 90 * @crossplatform 91 * @since 10 92 */ 93 ASSET_ABNORMAL, 94 95 /** 96 * ASSET_DOWNLOADING: means the status of asset is downloading. 97 * 98 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 99 * @crossplatform 100 * @since 10 101 */ 102 ASSET_DOWNLOADING 103 } 104 105 /** 106 * Records information of the asset. 107 * 108 * @interface Asset 109 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 110 * @crossplatform 111 * @since 10 112 */ 113 interface Asset { 114 /** 115 * The name of asset. 116 * 117 * @type { string } 118 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 119 * @crossplatform 120 * @since 10 121 */ 122 name: string; 123 124 /** 125 * The uri of asset. 126 * 127 * @type { string } 128 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 129 * @crossplatform 130 * @since 10 131 */ 132 uri: string; 133 134 /** 135 * The path of asset. 136 * 137 * @type { string } 138 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 139 * @crossplatform 140 * @since 10 141 */ 142 path: string; 143 144 /** 145 * The create time of asset. 146 * 147 * @type { string } 148 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 149 * @crossplatform 150 * @since 10 151 */ 152 createTime: string; 153 154 /** 155 * The modify time of asset. 156 * 157 * @type { string } 158 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 159 * @crossplatform 160 * @since 10 161 */ 162 modifyTime: string; 163 164 /** 165 * The size of asset. 166 * 167 * @type { string } 168 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 169 * @crossplatform 170 * @since 10 171 */ 172 size: string; 173 174 /** 175 * The status of asset. 176 * 177 * @type { ?AssetStatus } 178 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 179 * @crossplatform 180 * @since 10 181 */ 182 status?: AssetStatus; 183 } 184 185 /** 186 * Indicates several assets in one column 187 * 188 * @typedef { Asset[] } Assets 189 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 190 * @crossplatform 191 * @since 10 192 */ 193 type Assets = Asset[]; 194 195 /** 196 * Indicates possible value types 197 * 198 * @typedef { null | number | string | boolean | Uint8Array } ValueType 199 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 200 * @since 9 201 */ 202 /** 203 * Indicates possible value types 204 * 205 * @typedef { null | number | string | boolean | Uint8Array | Asset | Assets } ValueType 206 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 207 * @crossplatform 208 * @since 10 209 */ 210 /** 211 * Indicates possible value types 212 * 213 * @typedef { null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint } ValueType 214 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 215 * @crossplatform 216 * @since 12 217 */ 218 type ValueType = null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint; 219 220 /** 221 * Values in buckets are stored in key-value pairs 222 * 223 * @typedef { Record<string, ValueType> } ValuesBucket 224 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 225 * @since 9 226 */ 227 /** 228 * Values in buckets are stored in key-value pairs, move Uint8Array add to ValueType 229 * 230 * @typedef { Record<string, ValueType> } ValuesBucket 231 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 232 * @crossplatform 233 * @since 10 234 */ 235 /** 236 * Values in buckets are stored in key-value pairs, change {[key: string]: ValueType;} to Record<string, ValueType> 237 * 238 * @typedef { Record<string, ValueType> } ValuesBucket 239 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 240 * @crossplatform 241 * @since 11 242 */ 243 type ValuesBucket = Record<string, ValueType>; 244 245 /** 246 * The type of the priority key can be number or string 247 * 248 * @typedef { number | string } PRIKeyType 249 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 250 * @since 10 251 */ 252 type PRIKeyType = number | string; 253 254 /** 255 * The time is in UTC format. 256 * 257 * @typedef { Date } UTCTime 258 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 259 * @since 10 260 */ 261 type UTCTime = Date; 262 263 /** 264 * Indicates the primary key and UTC time of the modified rows. 265 * 266 * @typedef { Map<PRIKeyType, UTCTime> } ModifyTime 267 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 268 * @since 10 269 */ 270 type ModifyTime = Map<PRIKeyType, UTCTime>; 271 272 /** 273 * Manages relational database configurations. 274 * 275 * @interface StoreConfig 276 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 277 * @since 9 278 */ 279 /** 280 * Manages relational database configurations. 281 * 282 * @interface StoreConfig 283 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 284 * @crossplatform 285 * @since 10 286 */ 287 interface StoreConfig { 288 /** 289 * The database name. 290 * 291 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 292 * @since 9 293 */ 294 /** 295 * The database name. 296 * 297 * @type { string } 298 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 299 * @crossplatform 300 * @since 10 301 */ 302 name: string; 303 304 /** 305 * Specifies the security level of the database. 306 * 307 * @type { SecurityLevel } 308 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 309 * @crossplatform 310 * @since 9 311 */ 312 securityLevel: SecurityLevel; 313 314 /** 315 * Specifies whether the database is encrypted. 316 * 317 * @type { ?boolean } 318 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 319 * @since 9 320 */ 321 encrypt?: boolean; 322 323 /** 324 * The data group id of application. 325 * 326 * @type { ?string } 327 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 328 * @StageModelOnly 329 * @since 10 330 */ 331 dataGroupId?: string; 332 333 /** 334 * Specifies the directory relative to the database directory obtained from context 335 * 336 * @type { ?string } 337 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 338 * @crossplatform 339 * @since 11 340 */ 341 customDir?: string; 342 343 /** 344 * Specifies the root directory relative to the database 345 * 346 * @type { ?string } 347 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 348 * @crossplatform 349 * @since 18 350 */ 351 rootDir?: string; 352 353 /** 354 * Specifies whether to clean up dirty data that is synchronized to 355 * the local but deleted in the cloud. 356 * 357 * @type { ?boolean } 358 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 359 * @since 11 360 */ 361 autoCleanDirtyData?: boolean; 362 363 /** 364 * Specifies whether data can be searched. 365 * 366 * @type { ?boolean } 367 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 368 * @systemapi 369 * @since 11 370 */ 371 isSearchable?: boolean; 372 373 /** 374 * Specifies whether database allows rebuild. 375 * 376 * @type { ?boolean } 377 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 378 * @since 12 379 */ 380 allowRebuild?: boolean; 381 382 /** 383 * Specifies whether the vector type is supported. 384 * 385 * @type { ?boolean } 386 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 387 * @since 18 388 */ 389 vector?: boolean; 390 391 /** 392 * Specifies whether the database opened is read-only. 393 * If isReadOnly is true, other configuration items will become invalid. 394 * 395 * @type { ?boolean } 396 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 397 * @since 12 398 */ 399 isReadOnly?: boolean; 400 401 /** 402 * Indicates the names of the shared library containing fts etc. 403 * 404 * @type { ?Array<string> } 405 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 406 * @since 12 407 */ 408 pluginLibs?: Array<string>; 409 410 /** 411 * Enumerates the high availability modes of the RDB store. 412 * 413 * @type { ?HAMode } 414 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 415 * @systemapi 416 * @since 12 417 */ 418 haMode?: HAMode; 419 420 /** 421 * Specifies the cryptographic parameters used when opening an encrypted database. 422 * 423 * @type { ?CryptoParam } 424 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 425 * @since 14 426 */ 427 cryptoParam?: CryptoParam; 428 429 /** 430 * Specifies the tokenizer type when using fts capability. 431 * 432 * @type { ?Tokenizer } 433 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 434 * @since 17 435 */ 436 437 tokenizer?: Tokenizer; 438 439 /** 440 * Specifies whether the database need persistence. 441 * 442 * @type { ?boolean } 443 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 444 * @since 18 445 */ 446 447 persist?: boolean; 448 } 449 450 /** 451 * Enumerates the high availability modes of the RDB store. 452 * 453 * @enum { number } 454 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 455 * @systemapi 456 * @since 12 457 */ 458 enum HAMode { 459 /** 460 * SINGLE: Data is written to a single RDB store. 461 * 462 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 463 * @systemapi 464 * @since 12 465 */ 466 SINGLE = 0, 467 468 /** 469 * MAIN_REPLICA: Data is written to the main and replica RDB stores. 470 * 471 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 472 * @systemapi 473 * @since 12 474 */ 475 MAIN_REPLICA 476 } 477 478 /** 479 * Specifies the cryptographic parameters used when opening an encrypted database. 480 * 481 * @typedef CryptoParam 482 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 483 * @since 14 484 */ 485 interface CryptoParam { 486 /** 487 * Specifies the key used when opening an encrypted database. 488 * When finished passing the key to the database, its content should be set to all-zero. 489 * 490 * @type { Uint8Array } 491 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 492 * @since 14 493 */ 494 encryptionKey: Uint8Array; 495 496 /** 497 * Specifies the number of KDF iterations used when opening an encrypted database. 498 * Default number is 10000. 499 * When the number is set to 0, use default iteration number and encryption algorithm. 500 * 501 * @type { ?number } 502 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 503 * @since 14 504 */ 505 iterationCount?: number; 506 507 /** 508 * Specifies the encryption algorithm when opening an encrypted database. 509 * Default encryption algorithm is AES_256_GCM. 510 * 511 * @type { ?EncryptionAlgo } 512 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 513 * @since 14 514 */ 515 encryptionAlgo?: EncryptionAlgo; 516 517 /** 518 * Specifies the HMAC algorithm when opening an encrypted database. 519 * Default HMAC algorithm is SHA256. 520 * 521 * @type { ?HmacAlgo } 522 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 523 * @since 14 524 */ 525 hmacAlgo?: HmacAlgo; 526 527 /** 528 * Specifies the KDF algorithm when opening an encrypted database. 529 * Default KDF SHA algorithm is the same as HMAC algorithm. 530 * 531 * @type { ?KdfAlgo } 532 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 533 * @since 14 534 */ 535 kdfAlgo?: KdfAlgo; 536 537 /** 538 * Specifies the page size used when opening an encrypted database. 539 * Default crypto page size is 1024. 540 * 541 * @type { ?number } 542 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 543 * @since 14 544 */ 545 cryptoPageSize?: number; 546 } 547 548 /** 549 * Enumerates the supported encryption algorithm when opening a database. 550 * 551 * @enum { number } 552 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 553 * @since 14 554 */ 555 enum EncryptionAlgo { 556 /** 557 * AES_256_GCM: Database is encrypted using AES_256_GCM. 558 * 559 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 560 * @since 14 561 */ 562 AES_256_GCM = 0, 563 564 /** 565 * AES_256_CBC: Database is encrypted using AES_256_CBC. 566 * 567 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 568 * @since 14 569 */ 570 AES_256_CBC 571 } 572 573 /** 574 * Enumerates the supported HMAC algorithm when opening a database. 575 * 576 * @enum { number } 577 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 578 * @since 14 579 */ 580 enum HmacAlgo { 581 /** 582 * SHA1: HMAC_SHA1 algorithm. 583 * 584 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 585 * @since 14 586 */ 587 SHA1 = 0, 588 589 /** 590 * SHA256: HMAC_SHA256 algorithm. 591 * 592 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 593 * @since 14 594 */ 595 SHA256, 596 597 /** 598 * SHA512: HMAC_SHA512 algorithm. 599 * 600 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 601 * @since 14 602 */ 603 SHA512 604 } 605 606 /** 607 * Enumerates the supported KDF algorithm when opening a database. 608 * 609 * @enum { number } 610 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 611 * @since 14 612 */ 613 enum KdfAlgo { 614 /** 615 * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. 616 * 617 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 618 * @since 14 619 */ 620 KDF_SHA1 = 0, 621 622 /** 623 * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. 624 * 625 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 626 * @since 14 627 */ 628 KDF_SHA256, 629 630 /** 631 * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. 632 * 633 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 634 * @since 14 635 */ 636 KDF_SHA512 637 } 638 639 /** 640 * Enumerates the supported tokenizer when opening a database. 641 * 642 * @enum { number } 643 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 644 * @since 17 645 */ 646 enum Tokenizer { 647 /** 648 * NONE_TOKENIZER: not use tokenizer 649 * 650 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 651 * @since 17 652 */ 653 NONE_TOKENIZER = 0, 654 /** 655 * ICU_TOKENIZER: native icu tokenizer. 656 * 657 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 658 * @since 17 659 */ 660 ICU_TOKENIZER, 661 /** 662 * CUSTOM_TOKENIZER: self-developed enhance tokenizer. 663 * 664 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 665 * @since 18 666 */ 667 CUSTOM_TOKENIZER 668 } 669 670 /** 671 * The cloud sync progress 672 * 673 * @enum { number } 674 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 675 * @since 10 676 */ 677 enum Progress { 678 /** 679 * SYNC_BEGIN: means the sync process begin. 680 * 681 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 682 * @since 10 683 */ 684 SYNC_BEGIN, 685 686 /** 687 * SYNC_BEGIN: means the sync process is in progress 688 * 689 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 690 * @since 10 691 */ 692 SYNC_IN_PROGRESS, 693 694 /** 695 * SYNC_BEGIN: means the sync process is finished 696 * 697 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 698 * @since 10 699 */ 700 SYNC_FINISH 701 } 702 703 /** 704 * Describes the statistic of the cloud sync process. 705 * 706 * @interface Statistic 707 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 708 * @since 10 709 */ 710 interface Statistic { 711 /** 712 * Describes the total number of data to sync. 713 * 714 * @type { number } 715 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 716 * @since 10 717 */ 718 total: number; 719 720 /** 721 * Describes the number of successfully synced data. 722 * 723 * @type { number } 724 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 725 * @since 10 726 */ 727 successful: number; 728 729 /** 730 * Describes the number of data failed to sync. 731 * 732 * @type { number } 733 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 734 * @since 10 735 */ 736 failed: number; 737 738 /** 739 * Describes the number of data remained to sync. 740 * 741 * @type { number } 742 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 743 * @since 10 744 */ 745 remained: number; 746 } 747 748 /** 749 * Describes the {@code Statistic} details of the table. 750 * 751 * @interface TableDetails 752 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 753 * @since 10 754 */ 755 interface TableDetails { 756 /** 757 * Describes the {@code Statistic} details of the upload process. 758 * 759 * @type { Statistic } 760 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 761 * @since 10 762 */ 763 upload: Statistic; 764 765 /** 766 * Describes the {@code Statistic} details of the download process. 767 * 768 * @type { Statistic } 769 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 770 * @since 10 771 */ 772 download: Statistic; 773 } 774 775 /** 776 * Describes the status of {@code Progress}. 777 * 778 * @enum { number } 779 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 780 * @since 10 781 */ 782 enum ProgressCode { 783 /** 784 * SUCCESS: means the status of progress is success. 785 * 786 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 787 * @since 10 788 */ 789 SUCCESS, 790 791 /** 792 * UNKNOWN_ERROR: means the progress meets unknown error. 793 * 794 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 795 * @since 10 796 */ 797 UNKNOWN_ERROR, 798 799 /** 800 * NETWORK_ERROR: means the progress meets network error. 801 * 802 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 803 * @since 10 804 */ 805 NETWORK_ERROR, 806 807 /** 808 * CLOUD_DISABLED: means cloud is disabled. 809 * 810 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 811 * @since 10 812 */ 813 CLOUD_DISABLED, 814 815 /** 816 * LOCKED_BY_OTHERS: means the progress is locked by others. 817 * 818 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 819 * @since 10 820 */ 821 LOCKED_BY_OTHERS, 822 823 /** 824 * RECORD_LIMIT_EXCEEDED: means the record exceeds the limit. 825 * 826 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 827 * @since 10 828 */ 829 RECORD_LIMIT_EXCEEDED, 830 831 /** 832 * NO_SPACE_FOR_ASSET: means the cloud has no space for the asset. 833 * 834 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 835 * @since 10 836 */ 837 NO_SPACE_FOR_ASSET, 838 839 /** 840 * BLOCKED_BY_NETWORK_STRATEGY: means the sync blocked by network strategy. 841 * 842 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 843 * @since 12 844 */ 845 BLOCKED_BY_NETWORK_STRATEGY 846 } 847 848 /** 849 * Describes detail of the cloud sync {@code Progress}. 850 * 851 * @interface ProgressDetails 852 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 853 * @since 10 854 */ 855 interface ProgressDetails { 856 /** 857 * Describes the status of data sync progress. 858 * 859 * @type { Progress } 860 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 861 * @since 10 862 */ 863 schedule: Progress; 864 865 /** 866 * Describes the code of data sync progress. 867 * 868 * @type { ProgressCode } 869 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 870 * @since 10 871 */ 872 code: ProgressCode; 873 874 /** 875 * The statistic details of the tables. 876 * 877 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 878 * @since 10 879 */ 880 /** 881 * The statistic details of the tables. 882 * 883 * @type { Record<string, TableDetails> } 884 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 885 * @since 11 886 */ 887 details: Record<string, TableDetails>; 888 } 889 890 /** 891 * Defines information about the SQL statements executed. 892 * 893 * @interface SqlExecutionInfo 894 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 895 * @since 12 896 */ 897 interface SqlExecutionInfo { 898 /** 899 * Array of SQL statements executed. When the args of batchInsert is too large, there may be more than one SQL. 900 * 901 * @type { Array<string> } 902 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 903 * @since 12 904 */ 905 sql: Array<string>; 906 907 /** 908 * Total time used for executing the SQL statements, in μs. 909 * 910 * @type { number } 911 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 912 * @since 12 913 */ 914 totalTime: number; 915 916 /** 917 * Maximum time allowed to obtain the SQL file handle, in μs. 918 * 919 * @type { number } 920 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 921 * @since 12 922 */ 923 waitTime: number; 924 925 /** 926 * Time used to prepare SQL and args, in μs. 927 * 928 * @type { number } 929 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 930 * @since 12 931 */ 932 prepareTime: number; 933 934 /** 935 * Time used to execute the SQL statements, in μs. 936 * 937 * @type { number } 938 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 939 * @since 12 940 */ 941 executeTime: number; 942 } 943 944 /** 945 * Describes the {@code RdbStore} type. 946 * 947 * @enum { number } 948 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 949 * @crossplatform 950 * @since 9 951 */ 952 enum SecurityLevel { 953 /** 954 * S1: means the db is low level security 955 * There are some low impact, when the data is leaked. 956 * 957 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 958 * @crossplatform 959 * @since 9 960 */ 961 S1 = 1, 962 963 /** 964 * S2: means the db is middle level security 965 * There are some major impact, when the data is leaked. 966 * 967 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 968 * @crossplatform 969 * @since 9 970 */ 971 S2 = 2, 972 973 /** 974 * S3: means the db is high level security 975 * There are some severity impact, when the data is leaked. 976 * 977 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 978 * @crossplatform 979 * @since 9 980 */ 981 S3 = 3, 982 983 /** 984 * S4: means the db is critical level security 985 * There are some critical impact, when the data is leaked. 986 * 987 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 988 * @crossplatform 989 * @since 9 990 */ 991 S4 = 4 992 } 993 994 /** 995 * Indicates the database synchronization mode. 996 * 997 * @enum { number } 998 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 999 * @since 9 1000 */ 1001 enum SyncMode { 1002 /** 1003 * Indicates the data is pushed to remote device from local device. 1004 * 1005 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1006 * @since 9 1007 */ 1008 SYNC_MODE_PUSH = 0, 1009 1010 /** 1011 * Indicates the data is pulled from remote device to local device. 1012 * 1013 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1014 * @since 9 1015 */ 1016 SYNC_MODE_PULL = 1, 1017 1018 /** 1019 * Indicates the data is pulled from remote device to local device. 1020 * 1021 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1022 * @since 10 1023 */ 1024 SYNC_MODE_TIME_FIRST, 1025 1026 /** 1027 * Indicates force push the native data to the cloud. 1028 * 1029 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1030 * @since 10 1031 */ 1032 SYNC_MODE_NATIVE_FIRST, 1033 1034 /** 1035 * Indicates the data is pulled from cloud to local device. 1036 * 1037 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1038 * @since 10 1039 */ 1040 SYNC_MODE_CLOUD_FIRST 1041 } 1042 1043 /** 1044 * Describes the subscription type. 1045 * 1046 * @enum { number } 1047 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1048 * @since 9 1049 */ 1050 enum SubscribeType { 1051 /** 1052 * Subscription to remote data changes 1053 * 1054 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1055 * @since 9 1056 */ 1057 SUBSCRIBE_TYPE_REMOTE = 0, 1058 1059 /** 1060 * Subscription to cloud data changes 1061 * 1062 * @permission ohos.permission.DISTRIBUTED_DATASYNC 1063 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1064 * @since 10 1065 */ 1066 /** 1067 * Subscription to cloud data changes 1068 * 1069 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1070 * @since 12 1071 */ 1072 SUBSCRIBE_TYPE_CLOUD, 1073 1074 /** 1075 * Subscription to cloud data changes details 1076 * 1077 * @permission ohos.permission.DISTRIBUTED_DATASYNC 1078 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1079 * @since 10 1080 */ 1081 /** 1082 * Subscription to cloud data changes details 1083 * 1084 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1085 * @since 12 1086 */ 1087 SUBSCRIBE_TYPE_CLOUD_DETAILS, 1088 1089 /** 1090 * Subscription to local data changes details 1091 * 1092 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1093 * @since 12 1094 */ 1095 SUBSCRIBE_TYPE_LOCAL_DETAILS 1096 } 1097 1098 /** 1099 * Describes the change type. 1100 * 1101 * @enum { number } 1102 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1103 * @since 10 1104 */ 1105 enum ChangeType { 1106 /** 1107 * Means the change type is data change. 1108 * 1109 * @permission ohos.permission.DISTRIBUTED_DATASYNC 1110 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1111 * @since 10 1112 */ 1113 /** 1114 * Means the change type is data change. 1115 * 1116 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1117 * @since 12 1118 */ 1119 DATA_CHANGE, 1120 1121 /** 1122 * Means the change type is asset change. 1123 * 1124 * @permission ohos.permission.DISTRIBUTED_DATASYNC 1125 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1126 * @since 10 1127 */ 1128 /** 1129 * Means the change type is asset change. 1130 * 1131 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1132 * @since 12 1133 */ 1134 ASSET_CHANGE 1135 } 1136 1137 /** 1138 * Indicates the notify info 1139 * 1140 * @interface ChangeInfo 1141 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1142 * @since 10 1143 */ 1144 interface ChangeInfo { 1145 /** 1146 * Indicates the changed table 1147 * 1148 * @type { string } 1149 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1150 * @since 10 1151 */ 1152 table: string; 1153 1154 /** 1155 * Indicates the changed type 1156 * 1157 * @type { ChangeType } 1158 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1159 * @since 10 1160 */ 1161 type: ChangeType; 1162 1163 /** 1164 * Indicates if there is a string primary key, the inserted will keep data's primary keys 1165 * otherwise it will keep the data's rowid. 1166 * 1167 * @type { Array<string> | Array<number> } 1168 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1169 * @since 10 1170 */ 1171 inserted: Array<string> | Array<number>; 1172 1173 /** 1174 * Indicates if there is a string primary key, the updated will keep data's primary keys 1175 * otherwise it will keep the data's rowid. 1176 * 1177 * @type { Array<string> | Array<number> } 1178 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1179 * @since 10 1180 */ 1181 updated: Array<string> | Array<number>; 1182 1183 /** 1184 * Indicates if there is a string primary key, the deleted will keep data's primary keys 1185 * otherwise it will keep the data's rowid. 1186 * 1187 * @type { Array<string> | Array<number> } 1188 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1189 * @since 10 1190 */ 1191 deleted: Array<string> | Array<number>; 1192 } 1193 1194 /** 1195 * Describes the distribution type of the tables. 1196 * 1197 * @enum { number } 1198 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1199 * @since 10 1200 */ 1201 enum DistributedType { 1202 /** 1203 * Indicates the table is distributed among the devices 1204 * 1205 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1206 * @since 10 1207 */ 1208 DISTRIBUTED_DEVICE, 1209 1210 /** 1211 * Indicates the table is distributed between the cloud and the devices. 1212 * 1213 * @permission ohos.permission.DISTRIBUTED_DATASYNC 1214 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1215 * @since 10 1216 */ 1217 /** 1218 * Indicates the table is distributed between the cloud and the devices. 1219 * 1220 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1221 * @since 12 1222 */ 1223 DISTRIBUTED_CLOUD 1224 } 1225 1226 /** 1227 * Indicates the reference between tables. 1228 * 1229 * @interface Reference 1230 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1231 * @systemapi 1232 * @since 11 1233 */ 1234 interface Reference { 1235 /** 1236 * Indicates the table that references another table. 1237 * 1238 * @type { string } 1239 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1240 * @systemapi 1241 * @since 11 1242 */ 1243 sourceTable: string; 1244 1245 /** 1246 * Indicates the table to be referenced. 1247 * 1248 * @type { string } 1249 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1250 * @systemapi 1251 * @since 11 1252 */ 1253 targetTable: string; 1254 1255 /** 1256 * Indicates the reference fields. 1257 * 1258 * @type { Record<string, string> } 1259 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1260 * @systemapi 1261 * @since 11 1262 */ 1263 refFields: Record<string, string> 1264 } 1265 1266 /** 1267 * Manages the distributed configuration of the table. 1268 * 1269 * @interface DistributedConfig 1270 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1271 * @since 10 1272 */ 1273 interface DistributedConfig { 1274 /** 1275 * Specifies whether the database auto sync. 1276 * 1277 * @type { boolean } 1278 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1279 * @since 10 1280 */ 1281 autoSync: boolean; 1282 1283 /** 1284 * Specifies the reference relationships between tables. 1285 * 1286 * @type { ?Array<Reference> } 1287 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1288 * @systemapi 1289 * @since 11 1290 */ 1291 references?: Array<Reference>; 1292 1293 /** 1294 * Specifies whether async download assets. 1295 * 1296 * @type { ?boolean } 1297 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1298 * @since 18 1299 */ 1300 asyncDownloadAsset?: boolean; 1301 1302 /** 1303 * Specifies whether the cloud sync is enabled for the database. 1304 * 1305 * @type { ?boolean } 1306 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1307 * @since 18 1308 */ 1309 enableCloud?: boolean; 1310 } 1311 1312 /** 1313 * Describes the conflict resolutions to insert data into the table. 1314 * 1315 * @enum { number } 1316 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1317 * @crossplatform 1318 * @since 10 1319 */ 1320 enum ConflictResolution { 1321 /** 1322 * Implements no action when conflict occurs. 1323 * 1324 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1325 * @crossplatform 1326 * @since 10 1327 */ 1328 ON_CONFLICT_NONE = 0, 1329 1330 /** 1331 * Implements rollback operation when conflict occurs. 1332 * 1333 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1334 * @crossplatform 1335 * @since 10 1336 */ 1337 ON_CONFLICT_ROLLBACK = 1, 1338 1339 /** 1340 * Implements abort operation when conflict occurs. 1341 * 1342 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1343 * @crossplatform 1344 * @since 10 1345 */ 1346 ON_CONFLICT_ABORT = 2, 1347 1348 /** 1349 * Implements fail operation when conflict occurs. 1350 * 1351 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1352 * @crossplatform 1353 * @since 10 1354 */ 1355 ON_CONFLICT_FAIL = 3, 1356 1357 /** 1358 * Implements ignore operation when conflict occurs. 1359 * 1360 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1361 * @crossplatform 1362 * @since 10 1363 */ 1364 ON_CONFLICT_IGNORE = 4, 1365 1366 /** 1367 * Implements replace operation operator when conflict occurs. 1368 * 1369 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1370 * @crossplatform 1371 * @since 10 1372 */ 1373 ON_CONFLICT_REPLACE = 5 1374 } 1375 1376 /** 1377 * Describes the data origin sources. 1378 * 1379 * @enum { number } 1380 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1381 * @since 11 1382 */ 1383 enum Origin { 1384 /** 1385 * Indicates the data source is local. 1386 * 1387 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1388 * @since 11 1389 */ 1390 LOCAL, 1391 1392 /** 1393 * Indicates the data source is cloud. 1394 * 1395 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1396 * @since 11 1397 */ 1398 CLOUD, 1399 1400 /** 1401 * Indicates the data source is remote. 1402 * 1403 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1404 * @since 11 1405 */ 1406 REMOTE, 1407 } 1408 1409 /** 1410 * Enumerates the field. 1411 * 1412 * @enum { string } 1413 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1414 * @since 11 1415 */ 1416 enum Field { 1417 /** 1418 * Cursor field. 1419 * 1420 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1421 * @since 11 1422 */ 1423 CURSOR_FIELD = '#_cursor', 1424 1425 /** 1426 * Origin field. For details, see {@link Origin}. 1427 * 1428 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1429 * @since 11 1430 */ 1431 ORIGIN_FIELD = '#_origin', 1432 1433 /** 1434 * Deleted flag field. 1435 * Indicates whether data has deleted in cloud. 1436 * 1437 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1438 * @since 11 1439 */ 1440 DELETED_FLAG_FIELD = '#_deleted_flag', 1441 1442 /** 1443 * Data status field. 1444 * Indicates data status. 1445 * 1446 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1447 * @since 12 1448 */ 1449 DATA_STATUS_FIELD = '#_data_status', 1450 1451 /** 1452 * Owner field. 1453 * 1454 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1455 * @since 11 1456 */ 1457 OWNER_FIELD = '#_cloud_owner', 1458 1459 /** 1460 * Privilege field. 1461 * 1462 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1463 * @since 11 1464 */ 1465 PRIVILEGE_FIELD = '#_cloud_privilege', 1466 1467 /** 1468 * Sharing resource field. 1469 * 1470 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 1471 * @since 11 1472 */ 1473 SHARING_RESOURCE_FIELD = '#_sharing_resource_field' 1474 } 1475 1476 /** 1477 * Enumerates the type of rebuild. 1478 * 1479 * @enum { number } 1480 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1481 * @since 12 1482 */ 1483 enum RebuildType { 1484 /** 1485 * The database is not rebuilt or repaired. 1486 * 1487 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1488 * @since 12 1489 */ 1490 NONE, 1491 1492 /** 1493 * The database is rebuilt. 1494 * 1495 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1496 * @since 12 1497 */ 1498 REBUILT, 1499 1500 /** 1501 * The database is repaired. 1502 * 1503 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1504 * @since 12 1505 */ 1506 REPAIRED 1507 } 1508 1509 /** 1510 * Enumerates the type of transaction. 1511 * 1512 * @enum { number } 1513 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1514 * @since 14 1515 */ 1516 enum TransactionType { 1517 /** 1518 * The DEFERRED transaction. 1519 * 1520 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1521 * @since 14 1522 */ 1523 DEFERRED, 1524 1525 /** 1526 * The IMMEDIATE transaction. 1527 * 1528 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1529 * @since 14 1530 */ 1531 IMMEDIATE, 1532 1533 /** 1534 * The EXCLUSIVE transaction. 1535 * 1536 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1537 * @since 14 1538 */ 1539 EXCLUSIVE 1540 } 1541 1542 /** 1543 * Create transaction options. 1544 * 1545 * @interface TransactionOptions 1546 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1547 * @since 14 1548 */ 1549 interface TransactionOptions { 1550 /** 1551 * The type of transaction. 1552 * 1553 * @type { TransactionType } 1554 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1555 * @since 14 1556 */ 1557 transactionType?: TransactionType; 1558 } 1559 1560 /** 1561 * Enumerates the data types of a column. 1562 * 1563 * @enum { number } 1564 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1565 * @crossplatform 1566 * @since 18 1567 */ 1568 enum ColumnType { 1569 /** 1570 * The value in the column is null. 1571 * 1572 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1573 * @crossplatform 1574 * @since 18 1575 */ 1576 NULL, 1577 1578 /** 1579 * The value in the column is a 64-bit integer. It can be used to hold an 8-bit (including Boolean values), 16-bit, 1580 * 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 1581 * to convert the 64-bit integer into a string. 1582 * 1583 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1584 * @crossplatform 1585 * @since 18 1586 */ 1587 INTEGER, 1588 1589 /** 1590 * The value in the column is a floating point number. 1591 * 1592 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1593 * @crossplatform 1594 * @since 18 1595 */ 1596 REAL, 1597 1598 /** 1599 * The value in the column is a string. 1600 * 1601 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1602 * @crossplatform 1603 * @since 18 1604 */ 1605 TEXT, 1606 1607 /** 1608 * The value in the column is a Uint8Array. 1609 * 1610 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1611 * @crossplatform 1612 * @since 18 1613 */ 1614 BLOB, 1615 1616 /** 1617 * The value in the column is an asset. 1618 * 1619 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1620 * @crossplatform 1621 * @since 18 1622 */ 1623 ASSET, 1624 1625 /** 1626 * The value in the column is an array of assets. 1627 * 1628 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1629 * @crossplatform 1630 * @since 18 1631 */ 1632 ASSETS, 1633 1634 /** 1635 * The value in the column is a Float32Array. 1636 * 1637 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1638 * @crossplatform 1639 * @since 18 1640 */ 1641 FLOAT_VECTOR, 1642 1643 /** 1644 * The value in the column is a bigint. 1645 * 1646 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1647 * @crossplatform 1648 * @since 18 1649 */ 1650 UNLIMITED_INT, 1651 } 1652 1653 /** 1654 * Manages relational database configurations. 1655 * 1656 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1657 * @since 9 1658 */ 1659 /** 1660 * Manages relational database configurations. 1661 * 1662 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1663 * @crossplatform 1664 * @since 10 1665 */ 1666 class RdbPredicates { 1667 /** 1668 * A parameterized constructor used to create a RdbPredicates instance. 1669 * 1670 * @param { string } name - Indicates the table name of the database. 1671 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1672 * <br>2. Incorrect parameter types. 1673 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1674 * @since 9 1675 */ 1676 /** 1677 * A parameterized constructor used to create a RdbPredicates instance. 1678 * 1679 * @param { string } name - Indicates the table name of the database. 1680 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1681 * <br>2. Incorrect parameter types. 1682 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1683 * @crossplatform 1684 * @since 10 1685 */ 1686 constructor(name: string); 1687 1688 /** 1689 * Specifies remote devices which connect to local device when syncing distributed database. 1690 * When query database, this function should not be called. 1691 * 1692 * @param { Array<string> } devices - Indicates specified remote devices. 1693 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1694 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1695 * <br>2. Incorrect parameter types. 1696 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1697 * @since 9 1698 */ 1699 inDevices(devices: Array<string>): RdbPredicates; 1700 1701 /** 1702 * Specifies all remote devices which connect to local device when syncing distributed database. 1703 * When query database, this function should not be called. 1704 * 1705 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1706 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1707 * @since 9 1708 */ 1709 inAllDevices(): RdbPredicates; 1710 1711 /** 1712 * Configure the RdbPredicates to match the field whose data type is ValueType and value is equal 1713 * to a specified value. 1714 * This method is similar to = of the SQL statement. 1715 * 1716 * @param { string } field - Indicates the column name in the database table. 1717 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 1718 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1719 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1720 * <br>2. Incorrect parameter types. 1721 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1722 * @since 9 1723 */ 1724 /** 1725 * Configure the RdbPredicates to match the field whose data type is ValueType and value is equal 1726 * to a specified value. 1727 * This method is similar to = of the SQL statement. 1728 * 1729 * @param { string } field - Indicates the column name in the database table. 1730 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 1731 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1732 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1733 * <br>2. Incorrect parameter types. 1734 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1735 * @crossplatform 1736 * @since 10 1737 */ 1738 equalTo(field: string, value: ValueType): RdbPredicates; 1739 1740 /** 1741 * Configure the RdbPredicates to match the field whose data type is ValueType and value is not equal to 1742 * a specified value. 1743 * This method is similar to != of the SQL statement. 1744 * 1745 * @param { string } field - Indicates the column name in the database table. 1746 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 1747 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1748 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1749 * <br>2. Incorrect parameter types. 1750 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1751 * @since 9 1752 */ 1753 /** 1754 * Configure the RdbPredicates to match the field whose data type is ValueType and value is not equal to 1755 * a specified value. 1756 * This method is similar to != of the SQL statement. 1757 * 1758 * @param { string } field - Indicates the column name in the database table. 1759 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 1760 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1761 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1762 * <br>2. Incorrect parameter types. 1763 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1764 * @crossplatform 1765 * @since 10 1766 */ 1767 notEqualTo(field: string, value: ValueType): RdbPredicates; 1768 1769 /** 1770 * Adds a left parenthesis to the RdbPredicates. 1771 * This method is similar to ( of the SQL statement and needs to be used together with endWrap(). 1772 * 1773 * @returns { RdbPredicates } - The {@link RdbPredicates} with the left parenthesis. 1774 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1775 * @since 9 1776 */ 1777 /** 1778 * Adds a left parenthesis to the RdbPredicates. 1779 * This method is similar to ( of the SQL statement and needs to be used together with endWrap(). 1780 * 1781 * @returns { RdbPredicates } - The {@link RdbPredicates} with the left parenthesis. 1782 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1783 * @crossplatform 1784 * @since 10 1785 */ 1786 beginWrap(): RdbPredicates; 1787 1788 /** 1789 * Adds a right parenthesis to the RdbPredicates. 1790 * This method is similar to ) of the SQL statement and needs to be used together with beginWrap(). 1791 * 1792 * @returns { RdbPredicates } - The {@link RdbPredicates} with the right parenthesis. 1793 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1794 * @since 9 1795 */ 1796 /** 1797 * Adds a right parenthesis to the RdbPredicates. 1798 * This method is similar to ) of the SQL statement and needs to be used together with beginWrap(). 1799 * 1800 * @returns { RdbPredicates } - The {@link RdbPredicates} with the right parenthesis. 1801 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1802 * @crossplatform 1803 * @since 10 1804 */ 1805 endWrap(): RdbPredicates; 1806 1807 /** 1808 * Adds an or condition to the RdbPredicates. 1809 * This method is similar to or of the SQL statement. 1810 * 1811 * @returns { RdbPredicates } - The {@link RdbPredicates} with the or condition. 1812 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1813 * @since 9 1814 */ 1815 /** 1816 * Adds an or condition to the RdbPredicates. 1817 * This method is similar to or of the SQL statement. 1818 * 1819 * @returns { RdbPredicates } - The {@link RdbPredicates} with the or condition. 1820 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1821 * @crossplatform 1822 * @since 10 1823 */ 1824 or(): RdbPredicates; 1825 1826 /** 1827 * Adds an and condition to the RdbPredicates. 1828 * This method is similar to and of the SQL statement. 1829 * 1830 * @returns { RdbPredicates } - The {@link RdbPredicates} with the and condition. 1831 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1832 * @since 9 1833 */ 1834 /** 1835 * Adds an and condition to the RdbPredicates. 1836 * This method is similar to and of the SQL statement. 1837 * 1838 * @returns { RdbPredicates } - The {@link RdbPredicates} with the and condition. 1839 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1840 * @crossplatform 1841 * @since 10 1842 */ 1843 and(): RdbPredicates; 1844 1845 /** 1846 * Configure the RdbPredicates to match the field whose data type is string and value 1847 * contains a specified value. 1848 * This method is similar to contains of the SQL statement. 1849 * 1850 * @param { string } field - Indicates the column name in the database table. 1851 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 1852 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1853 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1854 * <br>2. Incorrect parameter types. 1855 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1856 * @since 9 1857 */ 1858 /** 1859 * Configure the RdbPredicates to match the field whose data type is string and value 1860 * contains a specified value. 1861 * This method is similar to contains of the SQL statement. 1862 * 1863 * @param { string } field - Indicates the column name in the database table. 1864 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 1865 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1866 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1867 * <br>2. Incorrect parameter types. 1868 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1869 * @crossplatform 1870 * @since 10 1871 */ 1872 contains(field: string, value: string): RdbPredicates; 1873 1874 /** 1875 * Configure the RdbPredicates to match the field whose data type is string and value starts 1876 * with a specified string. 1877 * This method is similar to value% of the SQL statement. 1878 * 1879 * @param { string } field - Indicates the column name in the database table. 1880 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 1881 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1882 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1883 * <br>2. Incorrect parameter types. 1884 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1885 * @since 9 1886 */ 1887 /** 1888 * Configure the RdbPredicates to match the field whose data type is string and value starts 1889 * with a specified string. 1890 * This method is similar to value% of the SQL statement. 1891 * 1892 * @param { string } field - Indicates the column name in the database table. 1893 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 1894 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1895 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1896 * <br>2. Incorrect parameter types. 1897 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1898 * @crossplatform 1899 * @since 10 1900 */ 1901 beginsWith(field: string, value: string): RdbPredicates; 1902 1903 /** 1904 * Configure the RdbPredicates to match the field whose data type is string and value 1905 * ends with a specified string. 1906 * This method is similar to %value of the SQL statement. 1907 * 1908 * @param { string } field - Indicates the column name in the database table. 1909 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 1910 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1911 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1912 * <br>2. Incorrect parameter types. 1913 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1914 * @since 9 1915 */ 1916 /** 1917 * Configure the RdbPredicates to match the field whose data type is string and value 1918 * ends with a specified string. 1919 * This method is similar to %value of the SQL statement. 1920 * 1921 * @param { string } field - Indicates the column name in the database table. 1922 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 1923 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1924 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1925 * <br>2. Incorrect parameter types. 1926 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1927 * @crossplatform 1928 * @since 10 1929 */ 1930 endsWith(field: string, value: string): RdbPredicates; 1931 1932 /** 1933 * Configure the RdbPredicates to match the fields whose value is null. 1934 * This method is similar to is null of the SQL statement. 1935 * 1936 * @param { string } field - Indicates the column name in the database table. 1937 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1938 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1939 * <br>2. Incorrect parameter types. 1940 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1941 * @since 9 1942 */ 1943 /** 1944 * Configure the RdbPredicates to match the fields whose value is null. 1945 * This method is similar to is null of the SQL statement. 1946 * 1947 * @param { string } field - Indicates the column name in the database table. 1948 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1949 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1950 * <br>2. Incorrect parameter types. 1951 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1952 * @crossplatform 1953 * @since 10 1954 */ 1955 isNull(field: string): RdbPredicates; 1956 1957 /** 1958 * Configure the RdbPredicates to match the specified fields whose value is not null. 1959 * This method is similar to is not null of the SQL statement. 1960 * 1961 * @param { string } field - Indicates the column name in the database table. 1962 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1963 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1964 * <br>2. Incorrect parameter types. 1965 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1966 * @since 9 1967 */ 1968 /** 1969 * Configure the RdbPredicates to match the specified fields whose value is not null. 1970 * This method is similar to is not null of the SQL statement. 1971 * 1972 * @param { string } field - Indicates the column name in the database table. 1973 * @returns { RdbPredicates } - The {@link RdbPredicates} self. 1974 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1975 * <br>2. Incorrect parameter types. 1976 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1977 * @crossplatform 1978 * @since 10 1979 */ 1980 isNotNull(field: string): RdbPredicates; 1981 1982 /** 1983 * Configure the RdbPredicates to match the fields whose data type is string and value is 1984 * similar to a specified string. 1985 * This method is similar to like of the SQL statement. 1986 * 1987 * @param { string } field - Indicates the column name in the database table. 1988 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 1989 * @returns { RdbPredicates } - The {@link RdbPredicates} that match the specified field. 1990 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1991 * <br>2. Incorrect parameter types. 1992 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 1993 * @since 9 1994 */ 1995 /** 1996 * Configure the RdbPredicates to match the fields whose data type is string and value is 1997 * similar to a specified string. 1998 * This method is similar to like of the SQL statement. 1999 * 2000 * @param { string } field - Indicates the column name in the database table. 2001 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2002 * @returns { RdbPredicates } - The {@link RdbPredicates} that match the specified field. 2003 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2004 * <br>2. Incorrect parameter types. 2005 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2006 * @crossplatform 2007 * @since 10 2008 */ 2009 like(field: string, value: string): RdbPredicates; 2010 2011 /** 2012 * Configure RdbPredicates to match the specified field whose data type is string and the value contains 2013 * a wildcard. 2014 * Different from like, the input parameters of this method are case-sensitive. 2015 * 2016 * @param { string } field - Indicates the column name in the database table. 2017 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2018 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2019 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2020 * <br>2. Incorrect parameter types. 2021 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2022 * @since 9 2023 */ 2024 /** 2025 * Configure RdbPredicates to match the specified field whose data type is string and the value contains 2026 * a wildcard. 2027 * Different from like, the input parameters of this method are case-sensitive. 2028 * 2029 * @param { string } field - Indicates the column name in the database table. 2030 * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. 2031 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2032 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2033 * <br>2. Incorrect parameter types. 2034 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2035 * @crossplatform 2036 * @since 10 2037 */ 2038 glob(field: string, value: string): RdbPredicates; 2039 2040 /** 2041 * Configure RdbPredicates to match the specified field whose value is within a given range. 2042 * 2043 * @param { string } field - Indicates the column name. 2044 * @param { ValueType } low - Indicates the minimum value. 2045 * @param { ValueType } high - Indicates the maximum value. 2046 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2047 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2048 * <br>2. Incorrect parameter types. 2049 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2050 * @since 9 2051 */ 2052 /** 2053 * Configure RdbPredicates to match the specified field whose value is within a given range. 2054 * 2055 * @param { string } field - Indicates the column name. 2056 * @param { ValueType } low - Indicates the minimum value. 2057 * @param { ValueType } high - Indicates the maximum value. 2058 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2059 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2060 * <br>2. Incorrect parameter types. 2061 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2062 * @crossplatform 2063 * @since 10 2064 */ 2065 between(field: string, low: ValueType, high: ValueType): RdbPredicates; 2066 2067 /** 2068 * Configure RdbPredicates to match the specified field whose value is out of a given range. 2069 * 2070 * @param { string } field - Indicates the column name in the database table. 2071 * @param { ValueType } low - Indicates the minimum value. 2072 * @param { ValueType } high - Indicates the maximum value. 2073 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2074 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2075 * <br>2. Incorrect parameter types. 2076 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2077 * @since 9 2078 */ 2079 /** 2080 * Configure RdbPredicates to match the specified field whose value is out of a given range. 2081 * 2082 * @param { string } field - Indicates the column name in the database table. 2083 * @param { ValueType } low - Indicates the minimum value. 2084 * @param { ValueType } high - Indicates the maximum value. 2085 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2086 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2087 * <br>2. Incorrect parameter types. 2088 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2089 * @crossplatform 2090 * @since 10 2091 */ 2092 notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates; 2093 2094 /** 2095 * Restricts the value of the field to be greater than the specified value. 2096 * 2097 * @param { string } field - Indicates the column name in the database table. 2098 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2099 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2100 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2101 * <br>2. Incorrect parameter types. 2102 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2103 * @since 9 2104 */ 2105 /** 2106 * Restricts the value of the field to be greater than the specified value. 2107 * 2108 * @param { string } field - Indicates the column name in the database table. 2109 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2110 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2111 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2112 * <br>2. Incorrect parameter types. 2113 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2114 * @crossplatform 2115 * @since 10 2116 */ 2117 greaterThan(field: string, value: ValueType): RdbPredicates; 2118 2119 /** 2120 * Restricts the value of the field to be smaller than the specified value. 2121 * 2122 * @param { string } field - Indicates the column name in the database table. 2123 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2124 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2125 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2126 * <br>2. Incorrect parameter types. 2127 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2128 * @since 9 2129 */ 2130 /** 2131 * Restricts the value of the field to be smaller than the specified value. 2132 * 2133 * @param { string } field - Indicates the column name in the database table. 2134 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2135 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2136 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2137 * <br>2. Incorrect parameter types. 2138 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2139 * @crossplatform 2140 * @since 10 2141 */ 2142 lessThan(field: string, value: ValueType): RdbPredicates; 2143 2144 /** 2145 * Restricts the value of the field to be greater than or equal to the specified value. 2146 * 2147 * @param { string } field - Indicates the column name in the database table. 2148 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2149 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2150 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2151 * <br>2. Incorrect parameter types. 2152 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2153 * @since 9 2154 */ 2155 /** 2156 * Restricts the value of the field to be greater than or equal to the specified value. 2157 * 2158 * @param { string } field - Indicates the column name in the database table. 2159 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2160 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2161 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2162 * <br>2. Incorrect parameter types. 2163 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2164 * @crossplatform 2165 * @since 10 2166 */ 2167 greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates; 2168 2169 /** 2170 * Restricts the value of the field to be smaller than or equal to the specified value. 2171 * 2172 * @param { string } field - Indicates the column name in the database table. 2173 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2174 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2175 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2176 * <br>2. Incorrect parameter types. 2177 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2178 * @since 9 2179 */ 2180 /** 2181 * Restricts the value of the field to be smaller than or equal to the specified value. 2182 * 2183 * @param { string } field - Indicates the column name in the database table. 2184 * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. 2185 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2186 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2187 * <br>2. Incorrect parameter types. 2188 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2189 * @crossplatform 2190 * @since 10 2191 */ 2192 lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates; 2193 2194 /** 2195 * Restricts the ascending order of the return list. When there are several orders, 2196 * the one close to the head has the highest priority. 2197 * 2198 * @param { string } field - Indicates the column name for sorting the return list. 2199 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2200 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2201 * <br>2. Incorrect parameter types. 2202 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2203 * @since 9 2204 */ 2205 /** 2206 * Restricts the ascending order of the return list. When there are several orders, 2207 * the one close to the head has the highest priority. 2208 * 2209 * @param { string } field - Indicates the column name for sorting the return list. 2210 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2211 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2212 * <br>2. Incorrect parameter types. 2213 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2214 * @crossplatform 2215 * @since 10 2216 */ 2217 orderByAsc(field: string): RdbPredicates; 2218 2219 /** 2220 * Restricts the descending order of the return list. When there are several orders, 2221 * the one close to the head has the highest priority. 2222 * 2223 * @param { string } field - Indicates the column name for sorting the return list. 2224 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2225 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2226 * <br>2. Incorrect parameter types. 2227 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2228 * @since 9 2229 */ 2230 /** 2231 * Restricts the descending order of the return list. When there are several orders, 2232 * the one close to the head has the highest priority. 2233 * 2234 * @param { string } field - Indicates the column name for sorting the return list. 2235 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2236 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2237 * <br>2. Incorrect parameter types. 2238 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2239 * @crossplatform 2240 * @since 10 2241 */ 2242 orderByDesc(field: string): RdbPredicates; 2243 2244 /** 2245 * Restricts each row of the query result to be unique. 2246 * 2247 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2248 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2249 * @since 9 2250 */ 2251 /** 2252 * Restricts each row of the query result to be unique. 2253 * 2254 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2255 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2256 * @crossplatform 2257 * @since 10 2258 */ 2259 distinct(): RdbPredicates; 2260 2261 /** 2262 * Restricts the max number of return records. 2263 * 2264 * @param { number } value - Indicates the max length of the return list. 2265 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2266 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2267 * <br>2. Incorrect parameter types. 2268 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2269 * @since 9 2270 */ 2271 /** 2272 * Restricts the max number of return records. 2273 * 2274 * @param { number } value - Indicates the max length of the return list. 2275 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2276 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2277 * <br>2. Incorrect parameter types. 2278 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2279 * @crossplatform 2280 * @since 10 2281 */ 2282 limitAs(value: number): RdbPredicates; 2283 2284 /** 2285 * Configure RdbPredicates to specify the start position of the returned result. 2286 * Use this method together with limit(number). 2287 * 2288 * @param { number } rowOffset - Indicates the start position of the returned result. The value is a positive integer. 2289 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2290 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2291 * <br>2. Incorrect parameter types. 2292 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2293 * @since 9 2294 */ 2295 /** 2296 * Configure RdbPredicates to specify the start position of the returned result. 2297 * Use this method together with limit(number). 2298 * 2299 * @param { number } rowOffset - Indicates the start position of the returned result. The value is a positive integer. 2300 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2301 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2302 * <br>2. Incorrect parameter types. 2303 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2304 * @crossplatform 2305 * @since 10 2306 */ 2307 offsetAs(rowOffset: number): RdbPredicates; 2308 2309 /** 2310 * Configure RdbPredicates to group query results by specified columns. 2311 * 2312 * @param { Array<string> } fields - Indicates the specified columns by which query results are grouped. 2313 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2314 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2315 * <br>2. Incorrect parameter types. 2316 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2317 * @since 9 2318 */ 2319 /** 2320 * Configure RdbPredicates to group query results by specified columns. 2321 * 2322 * @param { Array<string> } fields - Indicates the specified columns by which query results are grouped. 2323 * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. 2324 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2325 * <br>2. Incorrect parameter types. 2326 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2327 * @crossplatform 2328 * @since 10 2329 */ 2330 groupBy(fields: Array<string>): RdbPredicates; 2331 2332 /** 2333 * Configure RdbPredicates to specify the index column. 2334 * Before using this method, you need to create an index column. 2335 * 2336 * @param { string } field - Indicates the name of the index column. 2337 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2338 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2339 * <br>2. Incorrect parameter types. 2340 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2341 * @since 9 2342 */ 2343 /** 2344 * Configure RdbPredicates to specify the index column. 2345 * Before using this method, you need to create an index column. 2346 * 2347 * @param { string } field - Indicates the name of the index column. 2348 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2349 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2350 * <br>2. Incorrect parameter types. 2351 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2352 * @crossplatform 2353 * @since 10 2354 */ 2355 indexedBy(field: string): RdbPredicates; 2356 2357 /** 2358 * Configure RdbPredicates to match the specified field whose data type is ValueType array and values 2359 * are within a given range. 2360 * 2361 * @param { string } field - Indicates the column name in the database table. 2362 * @param { Array<ValueType> } value - Indicates the values to match with {@link RdbPredicates}. 2363 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2364 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2365 * <br>2. Incorrect parameter types. 2366 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2367 * @since 9 2368 */ 2369 /** 2370 * Configure RdbPredicates to match the specified field whose data type is ValueType array and values 2371 * are within a given range. 2372 * 2373 * @param { string } field - Indicates the column name in the database table. 2374 * @param { Array<ValueType> } value - Indicates the values to match with {@link RdbPredicates}. 2375 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2376 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2377 * <br>2. Incorrect parameter types. 2378 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2379 * @crossplatform 2380 * @since 10 2381 */ 2382 in(field: string, value: Array<ValueType>): RdbPredicates; 2383 2384 /** 2385 * Configure RdbPredicates to match the specified field whose data type is ValueType array and values 2386 * are out of a given range. 2387 * 2388 * @param { string } field - Indicates the column name in the database table. 2389 * @param { Array<ValueType> } value - Indicates the values to match with {@link RdbPredicates}. 2390 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2391 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2392 * <br>2. Incorrect parameter types. 2393 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2394 * @since 9 2395 */ 2396 /** 2397 * Configure RdbPredicates to match the specified field whose data type is ValueType array and values 2398 * are out of a given range. 2399 * 2400 * @param { string } field - Indicates the column name in the database table. 2401 * @param { Array<ValueType> } value - Indicates the values to match with {@link RdbPredicates}. 2402 * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. 2403 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2404 * <br>2. Incorrect parameter types. 2405 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2406 * @crossplatform 2407 * @since 10 2408 */ 2409 notIn(field: string, value: Array<ValueType>): RdbPredicates; 2410 2411 /** 2412 * Sets the RdbPredicates to match the field whose data type is string and value 2413 * does not contain the specified value. 2414 * This method is similar to "Not like %value%" of the SQL statement. 2415 * 2416 * @param { string } field - Indicates the column name in the database table. 2417 * @param { string } value - Indicates the value that is not contained. 2418 * @returns { RdbPredicates } - The {@Link RdbPredicates} set. 2419 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2420 * <br>2. Incorrect parameter types. 2421 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2422 * @since 12 2423 */ 2424 notContains(field: string, value: string): RdbPredicates; 2425 2426 /** 2427 * Sets the RdbPredicates to match the field whose data type is string and value 2428 * is not like the specified value. 2429 * This method is similar to "Not like" of the SQL statement. 2430 * 2431 * @param { string } field - Indicates the column name in the database table. 2432 * @param { string } value - Indicates the value to compare against. 2433 * @returns { RdbPredicates } - The {@Link RdbPredicates} set. 2434 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2435 * <br>2. Incorrect parameter types. 2436 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2437 * @since 12 2438 */ 2439 notLike(field: string, value: string): RdbPredicates; 2440 } 2441 2442 /** 2443 * Provides methods for accessing a database result set generated by querying the database. 2444 * 2445 * @interface ResultSet 2446 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2447 * @since 9 2448 */ 2449 /** 2450 * Provides methods for accessing a database result set generated by querying the database. 2451 * 2452 * @interface ResultSet 2453 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2454 * @crossplatform 2455 * @since 10 2456 */ 2457 interface ResultSet { 2458 /** 2459 * Obtains the names of all columns in a result set. 2460 * The column names are returned as a string array, in which the strings are in the same order 2461 * as the columns in the result set. 2462 * 2463 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2464 * @since 9 2465 */ 2466 /** 2467 * Obtains the names of all columns in a result set. 2468 * The column names are returned as a string array, in which the strings are in the same order 2469 * as the columns in the result set. 2470 * 2471 * @type { Array<string> } 2472 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2473 * @crossplatform 2474 * @since 10 2475 */ 2476 columnNames: Array<string>; 2477 2478 /** 2479 * Obtains the number of columns in the result set. 2480 * The returned number is equal to the length of the string array returned by the 2481 * columnNames method. 2482 * 2483 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2484 * @since 9 2485 */ 2486 /** 2487 * Obtains the number of columns in the result set. 2488 * The returned number is equal to the length of the string array returned by the 2489 * columnNames method. 2490 * 2491 * @type { number } 2492 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2493 * @crossplatform 2494 * @since 10 2495 */ 2496 columnCount: number; 2497 2498 /** 2499 * Obtains the number of rows in the result set. 2500 * 2501 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2502 * @since 9 2503 */ 2504 /** 2505 * Obtains the number of rows in the result set. 2506 * 2507 * @type { number } 2508 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2509 * @crossplatform 2510 * @since 10 2511 */ 2512 rowCount: number; 2513 2514 /** 2515 * Obtains the current index of the result set. 2516 * The result set index starts from 0. 2517 * 2518 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2519 * @since 9 2520 */ 2521 /** 2522 * Obtains the current index of the result set. 2523 * The result set index starts from 0. 2524 * 2525 * @type { number } 2526 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2527 * @crossplatform 2528 * @since 10 2529 */ 2530 rowIndex: number; 2531 2532 /** 2533 * Checks whether the cursor is positioned at the first row. 2534 * 2535 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2536 * @since 9 2537 */ 2538 /** 2539 * Checks whether the cursor is positioned at the first row. 2540 * 2541 * @type { boolean } 2542 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2543 * @crossplatform 2544 * @since 10 2545 */ 2546 isAtFirstRow: boolean; 2547 2548 /** 2549 * Checks whether the cursor is positioned at the last row. 2550 * 2551 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2552 * @since 9 2553 */ 2554 /** 2555 * Checks whether the cursor is positioned at the last row. 2556 * 2557 * @type { boolean } 2558 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2559 * @crossplatform 2560 * @since 10 2561 */ 2562 isAtLastRow: boolean; 2563 2564 /** 2565 * Checks whether the cursor is positioned after the last row. 2566 * 2567 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2568 * @since 9 2569 */ 2570 /** 2571 * Checks whether the cursor is positioned after the last row. 2572 * 2573 * @type { boolean } 2574 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2575 * @crossplatform 2576 * @since 10 2577 */ 2578 isEnded: boolean; 2579 2580 /** 2581 * Checks whether the cursor is positioned before the first row. 2582 * 2583 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2584 * @since 9 2585 */ 2586 /** 2587 * Checks whether the cursor is positioned before the first row. 2588 * 2589 * @type { boolean } 2590 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2591 * @crossplatform 2592 * @since 10 2593 */ 2594 isStarted: boolean; 2595 2596 /** 2597 * Checks whether the current result set is closed. 2598 * If the result set is closed by calling the close method, true will be returned. 2599 * 2600 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2601 * @since 9 2602 */ 2603 /** 2604 * Checks whether the current result set is closed. 2605 * If the result set is closed by calling the close method, true will be returned. 2606 * 2607 * @type { boolean } 2608 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2609 * @crossplatform 2610 * @since 10 2611 */ 2612 isClosed: boolean; 2613 2614 /** 2615 * Obtains the column index based on the specified column name. 2616 * The column name is passed as an input parameter. 2617 * 2618 * @param { string } columnName - Indicates the name of the specified column in the result set. 2619 * @returns { number } The index of the specified column. 2620 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 2621 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2622 * <br>2. Incorrect parameter types. 2623 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2624 * @since 9 2625 */ 2626 /** 2627 * Obtains the column index based on the specified column name. 2628 * The column name is passed as an input parameter. 2629 * 2630 * @param { string } columnName - Indicates the name of the specified column in the result set. 2631 * @returns { number } The index of the specified column. 2632 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 2633 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2634 * <br>2. Incorrect parameter types. 2635 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2636 * @crossplatform 2637 * @since 10 2638 */ 2639 /** 2640 * Obtains the column index based on the specified column name. 2641 * The column name is passed as an input parameter. 2642 * 2643 * @param { string } columnName - Indicates the name of the specified column in the result set. 2644 * @returns { number } The index of the specified column. 2645 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2646 * <br>2. Incorrect parameter types. 2647 * @throws { BusinessError } 14800000 - Inner error. 2648 * @throws { BusinessError } 14800011 - Database corrupted. 2649 * @throws { BusinessError } 14800013 - Column out of bounds. 2650 * @throws { BusinessError } 14800014 - Already closed. 2651 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 2652 * @throws { BusinessError } 14800021 - SQLite: Generic error. 2653 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 2654 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 2655 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 2656 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 2657 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 2658 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 2659 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 2660 * @throws { BusinessError } 14800029 - SQLite: The database is full. 2661 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 2662 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 2663 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 2664 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 2665 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 2666 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2667 * @crossplatform 2668 * @since 12 2669 */ 2670 getColumnIndex(columnName: string): number; 2671 2672 /** 2673 * Obtains the column name based on the specified column index. 2674 * The column index is passed as an input parameter. 2675 * 2676 * @param { number } columnIndex - Indicates the index of the specified column in the result set. 2677 * @returns { string } The name of the specified column. 2678 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 2679 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2680 * <br>2. Incorrect parameter types. 2681 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2682 * @since 9 2683 */ 2684 /** 2685 * Obtains the column name based on the specified column index. 2686 * The column index is passed as an input parameter. 2687 * 2688 * @param { number } columnIndex - Indicates the index of the specified column in the result set. 2689 * @returns { string } The name of the specified column. 2690 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 2691 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2692 * <br>2. Incorrect parameter types. 2693 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2694 * @crossplatform 2695 * @since 10 2696 */ 2697 /** 2698 * Obtains the column name based on the specified column index. 2699 * The column index is passed as an input parameter. 2700 * 2701 * @param { number } columnIndex - Indicates the index of the specified column in the result set. 2702 * @returns { string } The name of the specified column. 2703 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2704 * <br>2. Incorrect parameter types. 2705 * @throws { BusinessError } 14800000 - Inner error. 2706 * @throws { BusinessError } 14800011 - Database corrupted. 2707 * @throws { BusinessError } 14800013 - Column out of bounds. 2708 * @throws { BusinessError } 14800014 - Already closed. 2709 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 2710 * @throws { BusinessError } 14800021 - SQLite: Generic error. 2711 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 2712 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 2713 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 2714 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 2715 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 2716 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 2717 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 2718 * @throws { BusinessError } 14800029 - SQLite: The database is full. 2719 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 2720 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 2721 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 2722 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 2723 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 2724 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2725 * @crossplatform 2726 * @since 12 2727 */ 2728 getColumnName(columnIndex: number): string; 2729 2730 /** 2731 * Obtains the column data type based on the specified column index. 2732 * The column index is passed as an input parameter. 2733 * 2734 * @param { number | string } columnIdentifier - Index or name of the column. 2735 * @returns { Promise<ColumnType> } Promise used to return the data type obtained, 2736 * in an {@link ColumnType} instance. 2737 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2738 * <br>2. Incorrect parameter types. 2739 * @throws { BusinessError } 14800000 - Inner error. 2740 * @throws { BusinessError } 14800011 - Database corrupted. 2741 * @throws { BusinessError } 14800012 - Row out of bounds. 2742 * @throws { BusinessError } 14800013 - Column out of bounds. 2743 * @throws { BusinessError } 14800014 - Already closed. 2744 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 2745 * @throws { BusinessError } 14800021 - SQLite: Generic error. 2746 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 2747 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 2748 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 2749 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 2750 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 2751 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 2752 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 2753 * @throws { BusinessError } 14800029 - SQLite: The database is full. 2754 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 2755 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 2756 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 2757 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 2758 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 2759 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2760 * @crossplatform 2761 * @since 18 2762 */ 2763 getColumnType(columnIdentifier: number | string): Promise<ColumnType>; 2764 2765 /** 2766 * Obtains the column data type based on the specified column index. This API returns the result synchronously. 2767 * 2768 * @param { number | string } columnIdentifier - Index or name of the column. 2769 * @returns { ColumnType } Column data type obtained. 2770 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2771 * <br>2. Incorrect parameter types. 2772 * @throws { BusinessError } 14800000 - Inner error. 2773 * @throws { BusinessError } 14800011 - Database corrupted. 2774 * @throws { BusinessError } 14800012 - Row out of bounds. 2775 * @throws { BusinessError } 14800013 - Column out of bounds. 2776 * @throws { BusinessError } 14800014 - Already closed. 2777 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 2778 * @throws { BusinessError } 14800021 - SQLite: Generic error. 2779 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 2780 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 2781 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 2782 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 2783 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 2784 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 2785 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 2786 * @throws { BusinessError } 14800029 - SQLite: The database is full. 2787 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 2788 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 2789 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 2790 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 2791 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 2792 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2793 * @crossplatform 2794 * @since 18 2795 */ 2796 getColumnTypeSync(columnIdentifier: number | string): ColumnType; 2797 2798 /** 2799 * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. 2800 * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. 2801 * 2802 * @param { number } offset - Indicates the offset relative to the current position. 2803 * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; 2804 * Returns false otherwise. 2805 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 2806 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2807 * <br>2. Incorrect parameter types. 2808 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2809 * @since 9 2810 */ 2811 /** 2812 * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. 2813 * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. 2814 * 2815 * @param { number } offset - Indicates the offset relative to the current position. 2816 * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; 2817 * Returns false otherwise. 2818 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 2819 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2820 * <br>2. Incorrect parameter types. 2821 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2822 * @crossplatform 2823 * @since 10 2824 */ 2825 /** 2826 * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. 2827 * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. 2828 * 2829 * @param { number } offset - Indicates the offset relative to the current position. 2830 * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; 2831 * Returns false otherwise. 2832 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2833 * <br>2. Incorrect parameter types. 2834 * @throws { BusinessError } 14800000 - Inner error. 2835 * @throws { BusinessError } 14800011 - Database corrupted. 2836 * @throws { BusinessError } 14800012 - Row out of bounds. 2837 * @throws { BusinessError } 14800014 - Already closed. 2838 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 2839 * @throws { BusinessError } 14800021 - SQLite: Generic error. 2840 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 2841 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 2842 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 2843 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 2844 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 2845 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 2846 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 2847 * @throws { BusinessError } 14800029 - SQLite: The database is full. 2848 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 2849 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 2850 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 2851 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 2852 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 2853 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2854 * @crossplatform 2855 * @since 12 2856 */ 2857 goTo(offset: number): boolean; 2858 2859 /** 2860 * Go to the specified row of the result set. 2861 * 2862 * @param { number } position - Indicates the index of the specified row, which starts from 0. 2863 * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. 2864 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 2865 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2866 * <br>2. Incorrect parameter types. 2867 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2868 * @since 9 2869 */ 2870 /** 2871 * Go to the specified row of the result set. 2872 * 2873 * @param { number } position - Indicates the index of the specified row, which starts from 0. 2874 * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. 2875 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 2876 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2877 * <br>2. Incorrect parameter types. 2878 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2879 * @crossplatform 2880 * @since 10 2881 */ 2882 /** 2883 * Go to the specified row of the result set. 2884 * 2885 * @param { number } position - Indicates the index of the specified row, which starts from 0. 2886 * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. 2887 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2888 * <br>2. Incorrect parameter types. 2889 * @throws { BusinessError } 14800000 - Inner error. 2890 * @throws { BusinessError } 14800011 - Database corrupted. 2891 * @throws { BusinessError } 14800012 - Row out of bounds. 2892 * @throws { BusinessError } 14800014 - Already closed. 2893 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 2894 * @throws { BusinessError } 14800021 - SQLite: Generic error. 2895 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 2896 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 2897 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 2898 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 2899 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 2900 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 2901 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 2902 * @throws { BusinessError } 14800029 - SQLite: The database is full. 2903 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 2904 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 2905 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 2906 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 2907 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 2908 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2909 * @crossplatform 2910 * @since 12 2911 */ 2912 goToRow(position: number): boolean; 2913 2914 /** 2915 * Go to the first row of the result set. 2916 * 2917 * @returns { boolean } True if the result set is moved successfully; 2918 * Returns false otherwise, for example, if the result set is empty. 2919 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 2920 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2921 * @since 9 2922 */ 2923 /** 2924 * Go to the first row of the result set. 2925 * 2926 * @returns { boolean } True if the result set is moved successfully; 2927 * Returns false otherwise, for example, if the result set is empty. 2928 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 2929 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2930 * @crossplatform 2931 * @since 10 2932 */ 2933 /** 2934 * Go to the first row of the result set. 2935 * 2936 * @returns { boolean } True if the result set is moved successfully; 2937 * Returns false otherwise, for example, if the result set is empty. 2938 * @throws { BusinessError } 14800000 - Inner error. 2939 * @throws { BusinessError } 14800011 - Database corrupted. 2940 * @throws { BusinessError } 14800012 - Row out of bounds. 2941 * @throws { BusinessError } 14800014 - Already closed. 2942 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 2943 * @throws { BusinessError } 14800021 - SQLite: Generic error. 2944 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 2945 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 2946 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 2947 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 2948 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 2949 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 2950 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 2951 * @throws { BusinessError } 14800029 - SQLite: The database is full. 2952 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 2953 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 2954 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 2955 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 2956 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 2957 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2958 * @crossplatform 2959 * @since 12 2960 */ 2961 goToFirstRow(): boolean; 2962 2963 /** 2964 * Go to the last row of the result set. 2965 * 2966 * @returns { boolean } True if the result set is moved successfully; 2967 * Returns false otherwise, for example, if the result set is empty. 2968 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 2969 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2970 * @since 9 2971 */ 2972 /** 2973 * Go to the last row of the result set. 2974 * 2975 * @returns { boolean } True if the result set is moved successfully; 2976 * Returns false otherwise, for example, if the result set is empty. 2977 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 2978 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 2979 * @crossplatform 2980 * @since 10 2981 */ 2982 /** 2983 * Go to the last row of the result set. 2984 * 2985 * @returns { boolean } True if the result set is moved successfully; 2986 * Returns false otherwise, for example, if the result set is empty. 2987 * @throws { BusinessError } 14800000 - Inner error. 2988 * @throws { BusinessError } 14800011 - Database corrupted. 2989 * @throws { BusinessError } 14800012 - Row out of bounds. 2990 * @throws { BusinessError } 14800014 - Already closed. 2991 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 2992 * @throws { BusinessError } 14800021 - SQLite: Generic error. 2993 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 2994 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 2995 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 2996 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 2997 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 2998 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 2999 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3000 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3001 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3002 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3003 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3004 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3005 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3006 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3007 * @crossplatform 3008 * @since 12 3009 */ 3010 goToLastRow(): boolean; 3011 3012 /** 3013 * Go to the next row of the result set. 3014 * 3015 * @returns { boolean } True if the result set is moved successfully; 3016 * Returns false otherwise, for example, if the result set is already in the last row. 3017 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3018 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3019 * @since 9 3020 */ 3021 /** 3022 * Go to the next row of the result set. 3023 * 3024 * @returns { boolean } True if the result set is moved successfully; 3025 * Returns false otherwise, for example, if the result set is already in the last row. 3026 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3027 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3028 * @crossplatform 3029 * @since 10 3030 */ 3031 /** 3032 * Go to the next row of the result set. 3033 * 3034 * @returns { boolean } True if the result set is moved successfully; 3035 * Returns false otherwise, for example, if the result set is already in the last row. 3036 * @throws { BusinessError } 14800000 - Inner error. 3037 * @throws { BusinessError } 14800011 - Database corrupted. 3038 * @throws { BusinessError } 14800012 - Row out of bounds. 3039 * @throws { BusinessError } 14800014 - Already closed. 3040 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3041 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3042 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3043 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3044 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3045 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3046 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3047 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3048 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3049 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3050 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3051 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3052 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3053 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3054 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3055 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3056 * @crossplatform 3057 * @since 12 3058 */ 3059 goToNextRow(): boolean; 3060 3061 /** 3062 * Go to the previous row of the result set. 3063 * 3064 * @returns { boolean } True if the result set is moved successfully; 3065 * Returns false otherwise, for example, if the result set is already in the first row. 3066 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3067 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3068 * @since 9 3069 */ 3070 /** 3071 * Go to the previous row of the result set. 3072 * 3073 * @returns { boolean } True if the result set is moved successfully; 3074 * Returns false otherwise, for example, if the result set is already in the first row. 3075 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3076 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3077 * @crossplatform 3078 * @since 10 3079 */ 3080 /** 3081 * Go to the previous row of the result set. 3082 * 3083 * @returns { boolean } True if the result set is moved successfully; 3084 * Returns false otherwise, for example, if the result set is already in the first row. 3085 * @throws { BusinessError } 14800000 - Inner error. 3086 * @throws { BusinessError } 14800011 - Database corrupted. 3087 * @throws { BusinessError } 14800012 - Row out of bounds. 3088 * @throws { BusinessError } 14800014 - Already closed. 3089 * @throws { BusinessError } 14800019 - The SQL must be a query statement. 3090 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3091 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3092 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3093 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3094 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3095 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3096 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3097 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3098 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3099 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3100 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3101 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3102 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3103 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3104 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3105 * @crossplatform 3106 * @since 12 3107 */ 3108 goToPreviousRow(): boolean; 3109 3110 /** 3111 * Obtains the value of the specified column in the current row as a byte array. 3112 * The implementation class determines whether to throw an exception if the value of the specified column 3113 * in the current row is null or the specified column is not of the Blob type. 3114 * 3115 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3116 * @returns { Uint8Array } The value of the specified column as a byte array. 3117 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3118 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3119 * <br>2. Incorrect parameter types. 3120 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3121 * @since 9 3122 */ 3123 /** 3124 * Obtains the value of the specified column in the current row as a byte array. 3125 * The implementation class determines whether to throw an exception if the value of the specified column 3126 * in the current row is null or the specified column is not of the Blob type. 3127 * 3128 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3129 * @returns { Uint8Array } The value of the specified column as a byte array. 3130 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3131 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3132 * <br>2. Incorrect parameter types. 3133 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3134 * @crossplatform 3135 * @since 10 3136 */ 3137 /** 3138 * Obtains the value of the specified column in the current row as a byte array. 3139 * The implementation class determines whether to throw an exception if the value of the specified column 3140 * in the current row is null or the specified column is not of the Blob type. 3141 * 3142 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3143 * @returns { Uint8Array } The value of the specified column as a byte array. 3144 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3145 * <br>2. Incorrect parameter types. 3146 * @throws { BusinessError } 14800000 - Inner error. 3147 * @throws { BusinessError } 14800011 - Database corrupted. 3148 * @throws { BusinessError } 14800012 - Row out of bounds. 3149 * @throws { BusinessError } 14800013 - Column out of bounds. 3150 * @throws { BusinessError } 14800014 - Already closed. 3151 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3152 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3153 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3154 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3155 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3156 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3157 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3158 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3159 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3160 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3161 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3162 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3163 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3164 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3165 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3166 * @crossplatform 3167 * @since 12 3168 */ 3169 getBlob(columnIndex: number): Uint8Array; 3170 3171 /** 3172 * Obtains the value of the specified column in the current row as string. 3173 * The implementation class determines whether to throw an exception if the value of the specified column 3174 * in the current row is null or the specified column is not of the string type. 3175 * 3176 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3177 * @returns { string } The value of the specified column as a string. 3178 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3179 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3180 * <br>2. Incorrect parameter types. 3181 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3182 * @since 9 3183 */ 3184 /** 3185 * Obtains the value of the specified column in the current row as string. 3186 * The implementation class determines whether to throw an exception if the value of the specified column 3187 * in the current row is null or the specified column is not of the string type. 3188 * 3189 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3190 * @returns { string } The value of the specified column as a string. 3191 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3192 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3193 * <br>2. Incorrect parameter types. 3194 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3195 * @crossplatform 3196 * @since 10 3197 */ 3198 /** 3199 * Obtains the value of the specified column in the current row as string. 3200 * The implementation class determines whether to throw an exception if the value of the specified column 3201 * in the current row is null or the specified column is not of the string type. 3202 * 3203 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3204 * @returns { string } The value of the specified column as a string. 3205 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3206 * <br>2. Incorrect parameter types. 3207 * @throws { BusinessError } 14800000 - Inner error. 3208 * @throws { BusinessError } 14800011 - Database corrupted. 3209 * @throws { BusinessError } 14800012 - Row out of bounds. 3210 * @throws { BusinessError } 14800013 - Column out of bounds. 3211 * @throws { BusinessError } 14800014 - Already closed. 3212 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3213 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3214 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3215 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3216 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3217 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3218 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3219 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3220 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3221 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3222 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3223 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3224 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3225 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3226 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3227 * @crossplatform 3228 * @since 12 3229 */ 3230 getString(columnIndex: number): string; 3231 3232 /** 3233 * Obtains the value of the specified column in the current row as long. 3234 * The implementation class determines whether to throw an exception if the value of the specified column 3235 * in the current row is null, the specified column is not of the integer type. 3236 * 3237 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3238 * @returns { number } The value of the specified column as a long. 3239 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3240 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3241 * <br>2. Incorrect parameter types. 3242 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3243 * @since 9 3244 */ 3245 /** 3246 * Obtains the value of the specified column in the current row as long. 3247 * The implementation class determines whether to throw an exception if the value of the specified column 3248 * in the current row is null, the specified column is not of the integer type. 3249 * 3250 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3251 * @returns { number } The value of the specified column as a long. 3252 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3253 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3254 * <br>2. Incorrect parameter types. 3255 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3256 * @crossplatform 3257 * @since 10 3258 */ 3259 /** 3260 * Obtains the value of the specified column in the current row as long. 3261 * The implementation class determines whether to throw an exception if the value of the specified column 3262 * in the current row is null, the specified column is not of the integer type. 3263 * 3264 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3265 * @returns { number } The value of the specified column as a long. 3266 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3267 * <br>2. Incorrect parameter types. 3268 * @throws { BusinessError } 14800000 - Inner error. 3269 * @throws { BusinessError } 14800011 - Database corrupted. 3270 * @throws { BusinessError } 14800012 - Row out of bounds. 3271 * @throws { BusinessError } 14800013 - Column out of bounds. 3272 * @throws { BusinessError } 14800014 - Already closed. 3273 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3274 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3275 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3276 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3277 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3278 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3279 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3280 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3281 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3282 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3283 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3284 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3285 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3286 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3287 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3288 * @crossplatform 3289 * @since 12 3290 */ 3291 getLong(columnIndex: number): number; 3292 3293 /** 3294 * Obtains the value of the specified column in the current row as double. 3295 * The implementation class determines whether to throw an exception if the value of the specified column 3296 * in the current row is null, the specified column is not of the double type. 3297 * 3298 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3299 * @returns { number } The value of the specified column as a double. 3300 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3301 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3302 * <br>2. Incorrect parameter types. 3303 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3304 * @since 9 3305 */ 3306 /** 3307 * Obtains the value of the specified column in the current row as double. 3308 * The implementation class determines whether to throw an exception if the value of the specified column 3309 * in the current row is null, the specified column is not of the double type. 3310 * 3311 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3312 * @returns { number } The value of the specified column as a double. 3313 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3314 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3315 * <br>2. Incorrect parameter types. 3316 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3317 * @crossplatform 3318 * @since 10 3319 */ 3320 /** 3321 * Obtains the value of the specified column in the current row as double. 3322 * The implementation class determines whether to throw an exception if the value of the specified column 3323 * in the current row is null, the specified column is not of the double type. 3324 * 3325 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3326 * @returns { number } The value of the specified column as a double. 3327 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3328 * <br>2. Incorrect parameter types. 3329 * @throws { BusinessError } 14800000 - Inner error. 3330 * @throws { BusinessError } 14800011 - Database corrupted. 3331 * @throws { BusinessError } 14800012 - Row out of bounds. 3332 * @throws { BusinessError } 14800013 - Column out of bounds. 3333 * @throws { BusinessError } 14800014 - Already closed. 3334 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3335 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3336 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3337 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3338 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3339 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3340 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3341 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3342 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3343 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3344 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3345 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3346 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3347 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3348 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3349 * @crossplatform 3350 * @since 12 3351 */ 3352 getDouble(columnIndex: number): number; 3353 3354 /** 3355 * Obtains the value of the specified column in the current row as an asset. 3356 * The implementation class determines whether to throw an exception if the value of the specified column 3357 * in the current row is null or the specified column is not of the Asset type. 3358 * 3359 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3360 * @returns { Asset } The value of the specified column as an asset. 3361 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3362 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3363 * <br>2. Incorrect parameter types. 3364 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3365 * @crossplatform 3366 * @since 10 3367 */ 3368 /** 3369 * Obtains the value of the specified column in the current row as an asset. 3370 * The implementation class determines whether to throw an exception if the value of the specified column 3371 * in the current row is null or the specified column is not of the Asset type. 3372 * 3373 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3374 * @returns { Asset } The value of the specified column as an asset. 3375 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3376 * <br>2. Incorrect parameter types. 3377 * @throws { BusinessError } 14800000 - Inner error. 3378 * @throws { BusinessError } 14800011 - Database corrupted. 3379 * @throws { BusinessError } 14800012 - Row out of bounds. 3380 * @throws { BusinessError } 14800013 - Column out of bounds. 3381 * @throws { BusinessError } 14800014 - Already closed. 3382 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3383 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3384 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3385 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3386 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3387 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3388 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3389 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3390 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3391 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3392 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3393 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3394 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3395 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3396 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3397 * @crossplatform 3398 * @since 12 3399 */ 3400 getAsset(columnIndex: number): Asset; 3401 3402 /** 3403 * Obtains the value of the specified column in the current row as assets. 3404 * The implementation class determines whether to throw an exception if the value of the specified column 3405 * in the current row is null or the specified column is not of the Assets type. 3406 * 3407 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3408 * @returns { Assets } The value of the specified column as assets. 3409 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3410 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3411 * <br>2. Incorrect parameter types. 3412 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3413 * @crossplatform 3414 * @since 10 3415 */ 3416 /** 3417 * Obtains the value of the specified column in the current row as assets. 3418 * The implementation class determines whether to throw an exception if the value of the specified column 3419 * in the current row is null or the specified column is not of the Assets type. 3420 * 3421 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3422 * @returns { Assets } The value of the specified column as assets. 3423 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3424 * <br>2. Incorrect parameter types. 3425 * @throws { BusinessError } 14800000 - Inner error. 3426 * @throws { BusinessError } 14800011 - Database corrupted. 3427 * @throws { BusinessError } 14800012 - Row out of bounds. 3428 * @throws { BusinessError } 14800013 - Column out of bounds. 3429 * @throws { BusinessError } 14800014 - Already closed. 3430 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3431 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3432 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3433 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3434 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3435 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3436 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3437 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3438 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3439 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3440 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3441 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3442 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3443 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3444 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3445 * @crossplatform 3446 * @since 12 3447 */ 3448 getAssets(columnIndex: number): Assets; 3449 3450 /** 3451 * Obtains the value of the specified column in the current row. 3452 * The implementation class determines whether to throw an exception if the value of the specified column 3453 * in the current row is null or the specified column is not of the Assets type. 3454 * 3455 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3456 * @returns { ValueType } The value of the specified column. 3457 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3458 * <br>2. Incorrect parameter types. 3459 * @throws { BusinessError } 14800000 - Inner error. 3460 * @throws { BusinessError } 14800011 - Database corrupted. 3461 * @throws { BusinessError } 14800012 - Row out of bounds. 3462 * @throws { BusinessError } 14800013 - Column out of bounds. 3463 * @throws { BusinessError } 14800014 - Already closed. 3464 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3465 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3466 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3467 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3468 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3469 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3470 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3471 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3472 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3473 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3474 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3475 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3476 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3477 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3478 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3479 * @since 12 3480 */ 3481 /** 3482 * Obtains the value of the specified column in the current row. 3483 * The implementation class determines whether to throw an exception if the value of the specified column 3484 * in the current row is null or the specified column is not of the Assets type. 3485 * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, 3486 * the obtained value was null. 3487 * 3488 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3489 * @returns { ValueType } The value of the specified column. 3490 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3491 * <br>2. Incorrect parameter types. 3492 * @throws { BusinessError } 14800000 - Inner error. 3493 * @throws { BusinessError } 14800011 - Database corrupted. 3494 * @throws { BusinessError } 14800012 - Row out of bounds. 3495 * @throws { BusinessError } 14800013 - Column out of bounds. 3496 * @throws { BusinessError } 14800014 - Already closed. 3497 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3498 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3499 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3500 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3501 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3502 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3503 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3504 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3505 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3506 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3507 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3508 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3509 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3510 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3511 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3512 * @since 14 3513 */ 3514 getValue(columnIndex: number): ValueType; 3515 3516 /** 3517 * Obtains the value of the specified column in the current row as a float array. 3518 * The implementation class determines whether to throw an exception if the value of the specified column 3519 * in the current row is null or the specified column is not of the float array type. 3520 * 3521 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3522 * @returns { Float32Array } The value of the specified column as a float array. 3523 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3524 * <br>2. Incorrect parameter types. 3525 * @throws { BusinessError } 801 - The capability is not supported because the database is not a vector DB. 3526 * @throws { BusinessError } 14800011 - Database corrupted. 3527 * @throws { BusinessError } 14800013 - Column out of bounds. 3528 * @throws { BusinessError } 14800014 - Already closed. 3529 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3530 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3531 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3532 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3533 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3534 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3535 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3536 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3537 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3538 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3539 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3540 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3541 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3542 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3543 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3544 * @systemapi 3545 * @since 12 3546 */ 3547 getFloat32Array(columnIndex: number): Float32Array; 3548 3549 /** 3550 * Obtains the values of all columns in the specified row. 3551 * 3552 * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3553 * @throws { BusinessError } 14800000 - Inner error. 3554 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3555 * @crossplatform 3556 * @since 11 3557 */ 3558 /** 3559 * Obtains the values of all columns in the specified row. 3560 * 3561 * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3562 * @throws { BusinessError } 14800000 - Inner error. 3563 * @throws { BusinessError } 14800011 - Database corrupted. 3564 * @throws { BusinessError } 14800012 - Row out of bounds. 3565 * @throws { BusinessError } 14800013 - Column out of bounds. 3566 * @throws { BusinessError } 14800014 - Already closed. 3567 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3568 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3569 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3570 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3571 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3572 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3573 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3574 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3575 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3576 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3577 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3578 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3579 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3580 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3581 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3582 * @crossplatform 3583 * @since 12 3584 */ 3585 /** 3586 * Obtains the values of all columns in the specified row. 3587 * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, 3588 * the obtained value was null. 3589 * 3590 * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3591 * @throws { BusinessError } 14800000 - Inner error. 3592 * @throws { BusinessError } 14800011 - Database corrupted. 3593 * @throws { BusinessError } 14800012 - Row out of bounds. 3594 * @throws { BusinessError } 14800013 - Column out of bounds. 3595 * @throws { BusinessError } 14800014 - Already closed. 3596 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3597 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3598 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3599 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3600 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3601 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3602 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3603 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3604 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3605 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3606 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3607 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3608 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3609 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3610 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3611 * @crossplatform 3612 * @since 14 3613 */ 3614 getRow(): ValuesBucket; 3615 3616 /** 3617 * Obtains the values of all columns in the specified rows. 3618 * @param { number } maxCount - Indicates the maximum number of rows. 3619 * @param { number } position - Indicates the start position to obtain the values. 3620 * @returns { Promise<Array<ValuesBucket>> } Promise used to return the values obtained, in an{@link Array<ValuesBucket>}. 3621 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3622 * <br>2. Incorrect parameter types. 3623 * @throws { BusinessError } 14800000 - Inner error. 3624 * @throws { BusinessError } 14800011 - Database corrupted. 3625 * @throws { BusinessError } 14800012 - Row out of bounds. 3626 * @throws { BusinessError } 14800013 - Column out of bounds. 3627 * @throws { BusinessError } 14800014 - Already closed. 3628 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3629 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3630 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3631 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3632 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3633 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3634 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3635 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3636 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3637 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3638 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3639 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3640 * @crossplatform 3641 * @since 18 3642 */ 3643 getRows(maxCount: number, position?: number): Promise<Array<ValuesBucket>>; 3644 3645 /** 3646 * Obtains the values of all columns in the specified row. 3647 * 3648 * @returns { sendableRelationalStore.ValuesBucket } Indicates the row of data 3649 * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. 3650 * @throws { BusinessError } 14800000 - Inner error. 3651 * @throws { BusinessError } 14800011 - Database corrupted. 3652 * @throws { BusinessError } 14800012 - Row out of bounds. 3653 * @throws { BusinessError } 14800013 - Column out of bounds. 3654 * @throws { BusinessError } 14800014 - Already closed. 3655 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3656 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3657 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3658 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3659 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3660 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3661 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3662 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3663 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3664 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3665 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3666 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3667 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3668 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3669 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3670 * @since 12 3671 */ 3672 getSendableRow(): sendableRelationalStore.ValuesBucket; 3673 3674 /** 3675 * Checks whether the value of the specified column in the current row is null. 3676 * 3677 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3678 * @returns { boolean } True if the value of the specified column in the current row is null; 3679 * Returns false otherwise. 3680 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3681 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3682 * <br>2. Incorrect parameter types. 3683 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3684 * @since 9 3685 */ 3686 /** 3687 * Checks whether the value of the specified column in the current row is null. 3688 * 3689 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3690 * @returns { boolean } True if the value of the specified column in the current row is null; 3691 * Returns false otherwise. 3692 * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. 3693 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3694 * <br>2. Incorrect parameter types. 3695 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3696 * @crossplatform 3697 * @since 10 3698 */ 3699 /** 3700 * Checks whether the value of the specified column in the current row is null. 3701 * 3702 * @param { number } columnIndex - Indicates the specified column index, which starts from 0. 3703 * @returns { boolean } True if the value of the specified column in the current row is null; 3704 * Returns false otherwise. 3705 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3706 * <br>2. Incorrect parameter types. 3707 * @throws { BusinessError } 14800000 - Inner error. 3708 * @throws { BusinessError } 14800011 - Database corrupted. 3709 * @throws { BusinessError } 14800012 - Row out of bounds. 3710 * @throws { BusinessError } 14800013 - Column out of bounds. 3711 * @throws { BusinessError } 14800014 - Already closed. 3712 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3713 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3714 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3715 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3716 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3717 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3718 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3719 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3720 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3721 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3722 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3723 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3724 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3725 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3726 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3727 * @crossplatform 3728 * @since 12 3729 */ 3730 isColumnNull(columnIndex: number): boolean; 3731 3732 /** 3733 * Closes the result set. 3734 * Calling this method on the result set will release all of its resources and makes it ineffective. 3735 * 3736 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3737 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3738 * @since 9 3739 */ 3740 /** 3741 * Closes the result set. 3742 * Calling this method on the result set will release all of its resources and makes it ineffective. 3743 * 3744 * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. 3745 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3746 * @crossplatform 3747 * @since 10 3748 */ 3749 /** 3750 * Closes the result set. 3751 * Calling this method on the result set will release all of its resources and makes it ineffective. 3752 * 3753 * @throws { BusinessError } 14800000 - Inner error. 3754 * @throws { BusinessError } 14800012 - Row out of bounds. 3755 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3756 * @crossplatform 3757 * @since 12 3758 */ 3759 close(): void; 3760 } 3761 3762 /** 3763 * Provides methods for managing the relational database (RDB). 3764 * This class provides methods for creating, querying, updating, and deleting RDBs. 3765 * 3766 * @interface RdbStore 3767 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3768 * @since 9 3769 */ 3770 /** 3771 * Provides methods for managing the relational database (RDB). 3772 * This class provides methods for creating, querying, updating, and deleting RDBs. 3773 * 3774 * @interface RdbStore 3775 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3776 * @crossplatform 3777 * @since 10 3778 */ 3779 interface RdbStore { 3780 /** 3781 * Set RdbStore version. The version number must be an integer greater than 0. 3782 * Obtains the RdbStore version. 3783 * 3784 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3785 * <br>2. Incorrect parameter types. 3786 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3787 * @since 10 3788 */ 3789 /** 3790 * Set RdbStore version. The version number must be an integer greater than 0. 3791 * Obtains the RdbStore version. 3792 * 3793 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3794 * <br>2. Incorrect parameter types. 3795 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3796 * @crossplatform 3797 * @since 10 3798 */ 3799 /** 3800 * Set RdbStore version. The version number must be an integer greater than 0. 3801 * Obtains the RdbStore version. 3802 * 3803 * @type { number } 3804 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3805 * <br>2. Incorrect parameter types. 3806 * @throws { BusinessError } 801 - Capability not supported. 3807 * @throws { BusinessError } 14800000 - Inner error. 3808 * @throws { BusinessError } 14800014 - Already closed. 3809 * @throws { BusinessError } 14800015 - The database does not respond. 3810 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3811 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3812 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3813 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3814 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3815 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3816 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3817 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3818 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3819 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3820 * @crossplatform 3821 * @since 12 3822 */ 3823 version: number; 3824 3825 /** 3826 * Set whether the database is rebuilt. 3827 * 3828 * @type {RebuildType} 3829 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3830 * @since 12 3831 */ 3832 rebuilt: RebuildType; 3833 3834 /** 3835 * Inserts a row of data into the target table. 3836 * 3837 * @param { string } table - Indicates the target table. 3838 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3839 * @param { AsyncCallback<number> } callback - The row ID if the operation is successful. returns -1 otherwise. 3840 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3841 * <br>2. Incorrect parameter types. 3842 * @throws { BusinessError } 14800000 - Inner error. 3843 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3844 * @since 9 3845 */ 3846 /** 3847 * Inserts a row of data into the target table. 3848 * 3849 * @param { string } table - Indicates the target table. 3850 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3851 * @param { AsyncCallback<number> } callback - The row ID if the operation is successful. returns -1 otherwise. 3852 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 3853 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3854 * <br>2. Incorrect parameter types. 3855 * @throws { BusinessError } 14800000 - Inner error. 3856 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3857 * @crossplatform 3858 * @since 10 3859 */ 3860 /** 3861 * Inserts a row of data into the target table. 3862 * 3863 * @param { string } table - Indicates the target table. 3864 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3865 * @param { AsyncCallback<number> } callback - The row ID if the operation is successful. returns -1 otherwise. 3866 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3867 * <br>2. Incorrect parameter types. 3868 * @throws { BusinessError } 14800000 - Inner error. 3869 * @throws { BusinessError } 14800011 - Database corrupted. 3870 * @throws { BusinessError } 14800014 - Already closed. 3871 * @throws { BusinessError } 14800015 - The database does not respond. 3872 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3873 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3874 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3875 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3876 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3877 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3878 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3879 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3880 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3881 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3882 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3883 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3884 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3885 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3886 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 3887 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3888 * @crossplatform 3889 * @since 12 3890 */ 3891 insert(table: string, values: ValuesBucket, callback: AsyncCallback<number>): void; 3892 3893 /** 3894 * Inserts a row of data into the target table. 3895 * 3896 * @param { string } table - Indicates the target table. 3897 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3898 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 3899 * @param { AsyncCallback<number> } callback - The row ID if the operation is successful. returns -1 otherwise. 3900 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 3901 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3902 * <br>2. Incorrect parameter types. 3903 * @throws { BusinessError } 14800000 - Inner error. 3904 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3905 * @crossplatform 3906 * @since 10 3907 */ 3908 /** 3909 * Inserts a row of data into the target table. 3910 * 3911 * @param { string } table - Indicates the target table. 3912 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3913 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 3914 * @param { AsyncCallback<number> } callback - The row ID if the operation is successful. returns -1 otherwise. 3915 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3916 * <br>2. Incorrect parameter types. 3917 * @throws { BusinessError } 14800000 - Inner error. 3918 * @throws { BusinessError } 14800011 - Database corrupted. 3919 * @throws { BusinessError } 14800014 - Already closed. 3920 * @throws { BusinessError } 14800015 - The database does not respond. 3921 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3922 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3923 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3924 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3925 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3926 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3927 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3928 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3929 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3930 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3931 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3932 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3933 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3934 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3935 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 3936 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3937 * @crossplatform 3938 * @since 12 3939 */ 3940 insert(table: string, values: ValuesBucket, conflict: ConflictResolution, callback: AsyncCallback<number>): void; 3941 3942 /** 3943 * Inserts a row of data into the target table. 3944 * 3945 * @param { string } table - Indicates the target table. 3946 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3947 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 3948 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3949 * <br>2. Incorrect parameter types. 3950 * @throws { BusinessError } 14800000 - Inner error. 3951 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3952 * @since 9 3953 */ 3954 /** 3955 * Inserts a row of data into the target table. 3956 * 3957 * @param { string } table - Indicates the target table. 3958 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3959 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 3960 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 3961 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3962 * <br>2. Incorrect parameter types. 3963 * @throws { BusinessError } 14800000 - Inner error. 3964 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3965 * @crossplatform 3966 * @since 10 3967 */ 3968 /** 3969 * Inserts a row of data into the target table. 3970 * 3971 * @param { string } table - Indicates the target table. 3972 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 3973 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 3974 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3975 * <br>2. Incorrect parameter types. 3976 * @throws { BusinessError } 14800000 - Inner error. 3977 * @throws { BusinessError } 14800011 - Database corrupted. 3978 * @throws { BusinessError } 14800014 - Already closed. 3979 * @throws { BusinessError } 14800015 - The database does not respond. 3980 * @throws { BusinessError } 14800021 - SQLite: Generic error. 3981 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 3982 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 3983 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 3984 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 3985 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 3986 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 3987 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 3988 * @throws { BusinessError } 14800029 - SQLite: The database is full. 3989 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 3990 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 3991 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 3992 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 3993 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 3994 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 3995 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 3996 * @crossplatform 3997 * @since 12 3998 */ 3999 insert(table: string, values: ValuesBucket): Promise<number>; 4000 4001 /** 4002 * Inserts a row of data into the target table. 4003 * 4004 * @param { string } table - Indicates the target table. 4005 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4006 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4007 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 4008 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4009 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4010 * <br>2. Incorrect parameter types. 4011 * @throws { BusinessError } 14800000 - Inner error. 4012 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4013 * @crossplatform 4014 * @since 10 4015 */ 4016 /** 4017 * Inserts a row of data into the target table. 4018 * 4019 * @param { string } table - Indicates the target table. 4020 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4021 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4022 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 4023 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4024 * <br>2. Incorrect parameter types. 4025 * @throws { BusinessError } 14800000 - Inner error. 4026 * @throws { BusinessError } 14800011 - Database corrupted. 4027 * @throws { BusinessError } 14800014 - Already closed. 4028 * @throws { BusinessError } 14800015 - The database does not respond. 4029 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4030 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4031 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4032 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4033 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4034 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4035 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4036 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4037 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4038 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4039 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4040 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4041 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4042 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4043 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4044 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4045 * @crossplatform 4046 * @since 12 4047 */ 4048 insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise<number>; 4049 4050 /** 4051 * Inserts a row of data into the target table with sync interface. 4052 * 4053 * @param { string } table - Indicates the target table. 4054 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 4055 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4056 * @returns { number } The row ID if the operation is successful. return -1 otherwise. 4057 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4058 * <br>2. Incorrect parameter types. 4059 * @throws { BusinessError } 14800000 - Inner error. 4060 * @throws { BusinessError } 14800011 - Database corrupted. 4061 * @throws { BusinessError } 14800014 - Already closed. 4062 * @throws { BusinessError } 14800015 - The database does not respond. 4063 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4064 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4065 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4066 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4067 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4068 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4069 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4070 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4071 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4072 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4073 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4074 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4075 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4076 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4077 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4078 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4079 * @crossplatform 4080 * @since 12 4081 */ 4082 insertSync(table: string, values: ValuesBucket, conflict?: ConflictResolution): number; 4083 4084 /** 4085 * Inserts a row of data into the target table with sync interface. 4086 * 4087 * @param { string } table - Indicates the target table. 4088 * @param { sendableRelationalStore.ValuesBucket } values - Indicates the row of data 4089 * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. 4090 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4091 * @returns { number } The row ID if the operation is successful. return -1 otherwise. 4092 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4093 * <br>2. Incorrect parameter types. 4094 * @throws { BusinessError } 14800000 - Inner error. 4095 * @throws { BusinessError } 14800011 - Database corrupted. 4096 * @throws { BusinessError } 14800014 - Already closed. 4097 * @throws { BusinessError } 14800015 - The database does not respond. 4098 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4099 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4100 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4101 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4102 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4103 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4104 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4105 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4106 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4107 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4108 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4109 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4110 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4111 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4112 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4113 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4114 * @since 12 4115 */ 4116 insertSync(table: string, values: sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; 4117 4118 /** 4119 * Inserts a batch of data into the target table. 4120 * 4121 * @param { string } table - Indicates the target table. 4122 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4123 * @param { AsyncCallback<number> } callback - The number of values that were inserted if the operation is successful. returns -1 otherwise. 4124 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4125 * <br>2. Incorrect parameter types. 4126 * @throws { BusinessError } 14800000 - Inner error. 4127 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4128 * @since 9 4129 */ 4130 /** 4131 * Inserts a batch of data into the target table. 4132 * 4133 * @param { string } table - Indicates the target table. 4134 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4135 * @param { AsyncCallback<number> } callback - The number of values that were inserted if the operation is successful. returns -1 otherwise. 4136 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4137 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4138 * <br>2. Incorrect parameter types. 4139 * @throws { BusinessError } 14800000 - Inner error. 4140 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4141 * @crossplatform 4142 * @since 10 4143 */ 4144 /** 4145 * Inserts a batch of data into the target table. 4146 * 4147 * @param { string } table - Indicates the target table. 4148 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4149 * @param { AsyncCallback<number> } callback - The number of values that were inserted if the operation is successful. returns -1 otherwise. 4150 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4151 * <br>2. Incorrect parameter types. 4152 * @throws { BusinessError } 14800000 - Inner error. 4153 * @throws { BusinessError } 14800011 - Database corrupted. 4154 * @throws { BusinessError } 14800014 - Already closed. 4155 * @throws { BusinessError } 14800015 - The database does not respond. 4156 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4157 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4158 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4159 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4160 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4161 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4162 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4163 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4164 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4165 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4166 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4167 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4168 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4169 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4170 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4171 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4172 * @crossplatform 4173 * @since 12 4174 */ 4175 batchInsert(table: string, values: Array<ValuesBucket>, callback: AsyncCallback<number>): void; 4176 4177 /** 4178 * Inserts a batch of data into the target table. 4179 * 4180 * @param { string } table - Indicates the target table. 4181 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4182 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. returns -1 otherwise. 4183 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4184 * <br>2. Incorrect parameter types. 4185 * @throws { BusinessError } 14800000 - Inner error. 4186 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4187 * @since 9 4188 */ 4189 /** 4190 * Inserts a batch of data into the target table. 4191 * 4192 * @param { string } table - Indicates the target table. 4193 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4194 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. returns -1 otherwise. 4195 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4196 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4197 * <br>2. Incorrect parameter types. 4198 * @throws { BusinessError } 14800000 - Inner error. 4199 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4200 * @crossplatform 4201 * @since 10 4202 */ 4203 /** 4204 * Inserts a batch of data into the target table. 4205 * 4206 * @param { string } table - Indicates the target table. 4207 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4208 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. returns -1 otherwise. 4209 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4210 * <br>2. Incorrect parameter types. 4211 * @throws { BusinessError } 14800000 - Inner error. 4212 * @throws { BusinessError } 14800011 - Database corrupted. 4213 * @throws { BusinessError } 14800014 - Already closed. 4214 * @throws { BusinessError } 14800015 - The database does not respond. 4215 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4216 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4217 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4218 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4219 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4220 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4221 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4222 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4223 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4224 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4225 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4226 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4227 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4228 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4229 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4230 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4231 * @crossplatform 4232 * @since 12 4233 */ 4234 batchInsert(table: string, values: Array<ValuesBucket>): Promise<number>; 4235 4236 /** 4237 * Inserts a batch of data into the target table. 4238 * 4239 * @param { string } table - Indicates the target table. 4240 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4241 * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. 4242 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4243 * <br>2. Incorrect parameter types. 4244 * @throws { BusinessError } 14800000 - Inner error. 4245 * @throws { BusinessError } 14800011 - Database corrupted. 4246 * @throws { BusinessError } 14800014 - Already closed. 4247 * @throws { BusinessError } 14800015 - The database does not respond. 4248 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4249 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4250 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4251 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4252 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4253 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4254 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4255 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4256 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4257 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4258 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4259 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4260 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4261 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4262 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4263 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4264 * @crossplatform 4265 * @since 12 4266 */ 4267 batchInsertSync(table: string, values: Array<ValuesBucket>): number; 4268 4269 /** 4270 * Inserts a batch of data into the target table. 4271 * 4272 * @param { string } table - Indicates the target table. 4273 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4274 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4275 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. returns -1 otherwise. 4276 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4277 * <br>2. Incorrect parameter types. 4278 * @throws { BusinessError } 14800000 - Inner error. 4279 * @throws { BusinessError } 14800011 - Database corrupted. 4280 * @throws { BusinessError } 14800014 - Already closed. 4281 * @throws { BusinessError } 14800015 - The database does not respond. 4282 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4283 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4284 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4285 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4286 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4287 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4288 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4289 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4290 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4291 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4292 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4293 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4294 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4295 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4296 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4297 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4298 * @crossplatform 4299 * @since 18 4300 */ 4301 batchInsertWithConflictResolution(table: string, values: Array<ValuesBucket>, conflict: ConflictResolution): Promise<number>; 4302 4303 /** 4304 * Inserts a batch of data into the target table. 4305 * 4306 * @param { string } table - Indicates the target table. 4307 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 4308 * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. 4309 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4310 * <br>2. Incorrect parameter types. 4311 * @throws { BusinessError } 14800000 - Inner error. 4312 * @throws { BusinessError } 14800011 - Database corrupted. 4313 * @throws { BusinessError } 14800014 - Already closed. 4314 * @throws { BusinessError } 14800015 - The database does not respond. 4315 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4316 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4317 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4318 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4319 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4320 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4321 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4322 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4323 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4324 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4325 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4326 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4327 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4328 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4329 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4330 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4331 * @crossplatform 4332 * @since 18 4333 */ 4334 batchInsertWithConflictResolutionSync(table: string, values: Array<ValuesBucket>, conflict: ConflictResolution): number; 4335 4336 /** 4337 * Updates data in the database based on a specified instance object of RdbPredicates. 4338 * 4339 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4340 * The key-value pairs are associated with column names of the database table. 4341 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4342 * @param { AsyncCallback<number> } callback - The number of affected rows. 4343 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4344 * <br>2. Incorrect parameter types. 4345 * @throws { BusinessError } 14800000 - Inner error. 4346 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4347 * @since 9 4348 */ 4349 /** 4350 * Updates data in the database based on a specified instance object of RdbPredicates. 4351 * 4352 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4353 * The key-value pairs are associated with column names of the database table. 4354 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4355 * @param { AsyncCallback<number> } callback - The number of affected rows. 4356 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4357 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4358 * <br>2. Incorrect parameter types. 4359 * @throws { BusinessError } 14800000 - Inner error. 4360 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4361 * @crossplatform 4362 * @since 10 4363 */ 4364 /** 4365 * Updates data in the database based on a specified instance object of RdbPredicates. 4366 * 4367 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4368 * The key-value pairs are associated with column names of the database table. 4369 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4370 * @param { AsyncCallback<number> } callback - The number of affected rows. 4371 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4372 * <br>2. Incorrect parameter types. 4373 * @throws { BusinessError } 14800000 - Inner error. 4374 * @throws { BusinessError } 14800011 - Database corrupted. 4375 * @throws { BusinessError } 14800014 - Already closed. 4376 * @throws { BusinessError } 14800015 - The database does not respond. 4377 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4378 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4379 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4380 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4381 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4382 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4383 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4384 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4385 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4386 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4387 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4388 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4389 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4390 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4391 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4392 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4393 * @crossplatform 4394 * @since 12 4395 */ 4396 update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback<number>): void; 4397 4398 /** 4399 * Updates data in the database based on a specified instance object of RdbPredicates. 4400 * 4401 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4402 * The key-value pairs are associated with column names of the database table. 4403 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4404 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4405 * @param { AsyncCallback<number> } callback - The number of affected rows. 4406 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4407 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4408 * <br>2. Incorrect parameter types. 4409 * @throws { BusinessError } 14800000 - Inner error. 4410 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4411 * @crossplatform 4412 * @since 10 4413 */ 4414 /** 4415 * Updates data in the database based on a specified instance object of RdbPredicates. 4416 * 4417 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4418 * The key-value pairs are associated with column names of the database table. 4419 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4420 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4421 * @param { AsyncCallback<number> } callback - The number of affected rows. 4422 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4423 * <br>2. Incorrect parameter types. 4424 * @throws { BusinessError } 14800000 - Inner error. 4425 * @throws { BusinessError } 14800011 - Database corrupted. 4426 * @throws { BusinessError } 14800014 - Already closed. 4427 * @throws { BusinessError } 14800015 - The database does not respond. 4428 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4429 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4430 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4431 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4432 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4433 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4434 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4435 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4436 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4437 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4438 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4439 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4440 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4441 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4442 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4443 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4444 * @crossplatform 4445 * @since 12 4446 */ 4447 update( 4448 values: ValuesBucket, 4449 predicates: RdbPredicates, 4450 conflict: ConflictResolution, 4451 callback: AsyncCallback<number> 4452 ): void; 4453 4454 /** 4455 * Updates data in the database based on a specified instance object of RdbPredicates. 4456 * 4457 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4458 * The key-value pairs are associated with column names of the database table. 4459 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4460 * @returns { Promise<number> } The number of affected rows. 4461 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4462 * <br>2. Incorrect parameter types. 4463 * @throws { BusinessError } 14800000 - Inner error. 4464 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4465 * @since 9 4466 */ 4467 /** 4468 * Updates data in the database based on a specified instance object of RdbPredicates. 4469 * 4470 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4471 * The key-value pairs are associated with column names of the database table. 4472 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4473 * @returns { Promise<number> } The number of affected rows. 4474 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4475 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4476 * <br>2. Incorrect parameter types. 4477 * @throws { BusinessError } 14800000 - Inner error. 4478 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4479 * @crossplatform 4480 * @since 10 4481 */ 4482 /** 4483 * Updates data in the database based on a specified instance object of RdbPredicates. 4484 * 4485 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4486 * The key-value pairs are associated with column names of the database table. 4487 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4488 * @returns { Promise<number> } The number of affected rows. 4489 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4490 * <br>2. Incorrect parameter types. 4491 * @throws { BusinessError } 14800000 - Inner error. 4492 * @throws { BusinessError } 14800011 - Database corrupted. 4493 * @throws { BusinessError } 14800014 - Already closed. 4494 * @throws { BusinessError } 14800015 - The database does not respond. 4495 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4496 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4497 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4498 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4499 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4500 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4501 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4502 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4503 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4504 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4505 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4506 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4507 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4508 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4509 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4510 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4511 * @crossplatform 4512 * @since 12 4513 */ 4514 update(values: ValuesBucket, predicates: RdbPredicates): Promise<number>; 4515 4516 /** 4517 * Updates data in the database based on a specified instance object of RdbPredicates. 4518 * 4519 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4520 * The key-value pairs are associated with column names of the database table. 4521 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4522 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4523 * @returns { Promise<number> } The number of affected rows. 4524 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4525 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4526 * <br>2. Incorrect parameter types. 4527 * @throws { BusinessError } 14800000 - Inner error. 4528 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4529 * @crossplatform 4530 * @since 10 4531 */ 4532 /** 4533 * Updates data in the database based on a specified instance object of RdbPredicates. 4534 * 4535 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4536 * The key-value pairs are associated with column names of the database table. 4537 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4538 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4539 * @returns { Promise<number> } The number of affected rows. 4540 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4541 * <br>2. Incorrect parameter types. 4542 * @throws { BusinessError } 14800000 - Inner error. 4543 * @throws { BusinessError } 14800011 - Database corrupted. 4544 * @throws { BusinessError } 14800014 - Already closed. 4545 * @throws { BusinessError } 14800015 - The database does not respond. 4546 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4547 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4548 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4549 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4550 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4551 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4552 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4553 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4554 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4555 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4556 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4557 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4558 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4559 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4560 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4561 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4562 * @crossplatform 4563 * @since 12 4564 */ 4565 update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise<number>; 4566 4567 /** 4568 * Updates data in the database based on a specified instance object of RdbPredicates with sync interface. 4569 * 4570 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4571 * The key-value pairs are associated with column names of the database table. 4572 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 4573 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 4574 * @returns { number } The number of affected rows. 4575 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4576 * <br>2. Incorrect parameter types. 4577 * @throws { BusinessError } 14800000 - Inner error. 4578 * @throws { BusinessError } 14800011 - Database corrupted. 4579 * @throws { BusinessError } 14800014 - Already closed. 4580 * @throws { BusinessError } 14800015 - The database does not respond. 4581 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4582 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4583 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4584 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4585 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4586 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4587 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4588 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4589 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4590 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4591 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4592 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4593 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4594 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4595 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4596 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4597 * @crossplatform 4598 * @since 12 4599 */ 4600 updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number; 4601 4602 /** 4603 * Updates data in the database based on a specified instance object of RdbPredicates. 4604 * 4605 * @param { string } table - Indicates the target table. 4606 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4607 * The key-value pairs are associated with column names of the database table. 4608 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 4609 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 4610 * @param { AsyncCallback<number> } callback - The number of affected rows. 4611 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4612 * <br>2. Incorrect parameter types. 4613 * @throws { BusinessError } 14800000 - Inner error. 4614 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4615 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4616 * @systemapi 4617 * @StageModelOnly 4618 * @since 9 4619 */ 4620 /** 4621 * Updates data in the database based on a specified instance object of RdbPredicates. 4622 * 4623 * @param { string } table - Indicates the target table. 4624 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4625 * The key-value pairs are associated with column names of the database table. 4626 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 4627 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 4628 * @param { AsyncCallback<number> } callback - The number of affected rows. 4629 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4630 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4631 * <br>2. Incorrect parameter types. 4632 * @throws { BusinessError } 14800000 - Inner error. 4633 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4634 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4635 * @systemapi 4636 * @StageModelOnly 4637 * @since 10 4638 */ 4639 /** 4640 * Updates data in the database based on a specified instance object of RdbPredicates. 4641 * 4642 * @param { string } table - Indicates the target table. 4643 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4644 * The key-value pairs are associated with column names of the database table. 4645 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 4646 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 4647 * @param { AsyncCallback<number> } callback - The number of affected rows. 4648 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4649 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4650 * <br>2. Incorrect parameter types. 4651 * @throws { BusinessError } 14800000 - Inner error. 4652 * @throws { BusinessError } 14800011 - Database corrupted. 4653 * @throws { BusinessError } 14800014 - Already closed. 4654 * @throws { BusinessError } 14800015 - The database does not respond. 4655 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4656 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4657 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4658 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4659 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4660 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4661 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4662 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4663 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4664 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4665 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4666 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4667 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4668 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4669 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4670 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4671 * @systemapi 4672 * @StageModelOnly 4673 * @since 12 4674 */ 4675 update( 4676 table: string, 4677 values: ValuesBucket, 4678 predicates: dataSharePredicates.DataSharePredicates, 4679 callback: AsyncCallback<number> 4680 ): void; 4681 4682 /** 4683 * Updates data in the database based on a specified instance object of RdbPredicates. 4684 * 4685 * @param { string } table - Indicates the target table. 4686 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4687 * The key-value pairs are associated with column names of the database table. 4688 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 4689 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 4690 * @returns { Promise<number> } The number of affected rows. 4691 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4692 * <br>2. Incorrect parameter types. 4693 * @throws { BusinessError } 14800000 - Inner error. 4694 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4695 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4696 * @systemapi 4697 * @StageModelOnly 4698 * @since 9 4699 */ 4700 /** 4701 * Updates data in the database based on a specified instance object of RdbPredicates. 4702 * 4703 * @param { string } table - Indicates the target table. 4704 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4705 * The key-value pairs are associated with column names of the database table. 4706 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 4707 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 4708 * @returns { Promise<number> } The number of affected rows. 4709 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4710 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4711 * <br>2. Incorrect parameter types. 4712 * @throws { BusinessError } 14800000 - Inner error. 4713 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4714 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4715 * @systemapi 4716 * @StageModelOnly 4717 * @since 10 4718 */ 4719 /** 4720 * Updates data in the database based on a specified instance object of RdbPredicates. 4721 * 4722 * @param { string } table - Indicates the target table. 4723 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 4724 * The key-value pairs are associated with column names of the database table. 4725 * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by 4726 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 4727 * @returns { Promise<number> } The number of affected rows. 4728 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4729 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4730 * <br>2. Incorrect parameter types. 4731 * @throws { BusinessError } 14800000 - Inner error. 4732 * @throws { BusinessError } 14800011 - Database corrupted. 4733 * @throws { BusinessError } 14800014 - Already closed. 4734 * @throws { BusinessError } 14800015 - The database does not respond. 4735 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4736 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4737 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4738 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4739 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4740 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4741 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4742 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4743 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4744 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4745 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4746 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4747 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4748 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4749 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4750 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4751 * @systemapi 4752 * @StageModelOnly 4753 * @since 12 4754 */ 4755 update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise<number>; 4756 4757 /** 4758 * Deletes data from the database based on a specified instance object of RdbPredicates. 4759 * 4760 * @param { RdbPredicates } predicates - The specified delete condition by the instance object of {@link RdbPredicates}. 4761 * @param { AsyncCallback<number> } callback - The number of affected rows. 4762 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4763 * <br>2. Incorrect parameter types. 4764 * @throws { BusinessError } 14800000 - Inner error. 4765 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4766 * @since 9 4767 */ 4768 /** 4769 * Deletes data from the database based on a specified instance object of RdbPredicates. 4770 * 4771 * @param { RdbPredicates } predicates - The specified delete condition by the instance object of {@link RdbPredicates}. 4772 * @param { AsyncCallback<number> } callback - The number of affected rows. 4773 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4774 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4775 * <br>2. Incorrect parameter types. 4776 * @throws { BusinessError } 14800000 - Inner error. 4777 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4778 * @crossplatform 4779 * @since 10 4780 */ 4781 /** 4782 * Deletes data from the database based on a specified instance object of RdbPredicates. 4783 * 4784 * @param { RdbPredicates } predicates - The specified delete condition by the instance object of {@link RdbPredicates}. 4785 * @param { AsyncCallback<number> } callback - The number of affected rows. 4786 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4787 * <br>2. Incorrect parameter types. 4788 * @throws { BusinessError } 14800000 - Inner error. 4789 * @throws { BusinessError } 14800011 - Database corrupted. 4790 * @throws { BusinessError } 14800014 - Already closed. 4791 * @throws { BusinessError } 14800015 - The database does not respond. 4792 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4793 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4794 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4795 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4796 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4797 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4798 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4799 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4800 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4801 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4802 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4803 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4804 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4805 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4806 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4807 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4808 * @crossplatform 4809 * @since 12 4810 */ 4811 delete(predicates: RdbPredicates, callback: AsyncCallback<number>): void; 4812 4813 /** 4814 * Deletes data from the database based on a specified instance object of RdbPredicates. 4815 * 4816 * @param { RdbPredicates } predicates - The specified delete condition by the instance object of {@link RdbPredicates}. 4817 * @returns { Promise<number> } The number of affected rows. 4818 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4819 * <br>2. Incorrect parameter types. 4820 * @throws { BusinessError } 14800000 - Inner error. 4821 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4822 * @since 9 4823 */ 4824 /** 4825 * Deletes data from the database based on a specified instance object of RdbPredicates. 4826 * 4827 * @param { RdbPredicates } predicates - The specified delete condition by the instance object of {@link RdbPredicates}. 4828 * @returns { Promise<number> } return the number of affected rows. 4829 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4830 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4831 * <br>2. Incorrect parameter types. 4832 * @throws { BusinessError } 14800000 - Inner error. 4833 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4834 * @crossplatform 4835 * @since 10 4836 */ 4837 /** 4838 * Deletes data from the database based on a specified instance object of RdbPredicates. 4839 * 4840 * @param { RdbPredicates } predicates - The specified delete condition by the instance object of {@link RdbPredicates}. 4841 * @returns { Promise<number> } return the number of affected rows. 4842 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4843 * <br>2. Incorrect parameter types. 4844 * @throws { BusinessError } 14800000 - Inner error. 4845 * @throws { BusinessError } 14800011 - Database corrupted. 4846 * @throws { BusinessError } 14800014 - Already closed. 4847 * @throws { BusinessError } 14800015 - The database does not respond. 4848 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4849 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4850 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4851 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4852 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4853 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4854 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4855 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4856 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4857 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4858 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4859 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4860 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4861 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4862 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4863 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4864 * @crossplatform 4865 * @since 12 4866 */ 4867 delete(predicates: RdbPredicates): Promise<number>; 4868 4869 /** 4870 * Deletes data from the database based on a specified instance object of RdbPredicates with sync interface. 4871 * 4872 * @param { RdbPredicates } predicates - The specified delete condition by the instance object of {@link RdbPredicates}. 4873 * @returns { number } return the number of affected rows. 4874 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4875 * <br>2. Incorrect parameter types. 4876 * @throws { BusinessError } 14800000 - Inner error. 4877 * @throws { BusinessError } 14800011 - Database corrupted. 4878 * @throws { BusinessError } 14800014 - Already closed. 4879 * @throws { BusinessError } 14800015 - The database does not respond. 4880 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4881 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4882 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4883 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4884 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4885 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4886 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4887 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4888 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4889 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4890 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4891 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4892 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4893 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4894 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4895 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4896 * @crossplatform 4897 * @since 12 4898 */ 4899 deleteSync(predicates: RdbPredicates): number; 4900 /** 4901 * Deletes data from the database based on a specified instance object of RdbPredicates. 4902 * 4903 * @param { string } table - Indicates the target table. 4904 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified delete condition by 4905 * the instance object of {@link dataSharePredicates.DataSharePredicates}. 4906 * @param { AsyncCallback<number> } callback - The number of affected rows. 4907 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4908 * <br>2. Incorrect parameter types. 4909 * @throws { BusinessError } 14800000 - Inner error. 4910 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4911 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4912 * @systemapi 4913 * @StageModelOnly 4914 * @since 9 4915 */ 4916 /** 4917 * Deletes data from the database based on a specified instance object of RdbPredicates. 4918 * 4919 * @param { string } table - Indicates the target table. 4920 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified delete condition by the instance object 4921 * of {@link dataSharePredicates.DataSharePredicates}. 4922 * @param { AsyncCallback<number> } callback - The number of affected rows. 4923 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4924 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4925 * <br>2. Incorrect parameter types. 4926 * @throws { BusinessError } 14800000 - Inner error. 4927 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4928 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4929 * @systemapi 4930 * @StageModelOnly 4931 * @since 10 4932 */ 4933 /** 4934 * Deletes data from the database based on a specified instance object of RdbPredicates. 4935 * 4936 * @param { string } table - Indicates the target table. 4937 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified delete condition by the instance object 4938 * of {@link dataSharePredicates.DataSharePredicates}. 4939 * @param { AsyncCallback<number> } callback - The number of affected rows. 4940 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4941 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4942 * <br>2. Incorrect parameter types. 4943 * @throws { BusinessError } 14800000 - Inner error. 4944 * @throws { BusinessError } 14800011 - Database corrupted. 4945 * @throws { BusinessError } 14800014 - Already closed. 4946 * @throws { BusinessError } 14800015 - The database does not respond. 4947 * @throws { BusinessError } 14800021 - SQLite: Generic error. 4948 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 4949 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 4950 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 4951 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 4952 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 4953 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 4954 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 4955 * @throws { BusinessError } 14800029 - SQLite: The database is full. 4956 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 4957 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 4958 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 4959 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 4960 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 4961 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4962 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4963 * @systemapi 4964 * @StageModelOnly 4965 * @since 12 4966 */ 4967 delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<number>): void; 4968 4969 /** 4970 * Deletes data from the database based on a specified instance object of RdbPredicates. 4971 * 4972 * @param { string } table - Indicates the target table. 4973 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified delete condition by the instance object 4974 * of {@link dataSharePredicates.DataSharePredicates}. 4975 * @returns { Promise<number> } The number of affected rows. 4976 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4977 * <br>2. Incorrect parameter types. 4978 * @throws { BusinessError } 14800000 - Inner error. 4979 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4980 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4981 * @systemapi 4982 * @StageModelOnly 4983 * @since 9 4984 */ 4985 /** 4986 * Deletes data from the database based on a specified instance object of RdbPredicates. 4987 * 4988 * @param { string } table - Indicates the target table. 4989 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified delete condition by the instance object 4990 * of {@link dataSharePredicates.DataSharePredicates}. 4991 * @returns { Promise<number> } The number of affected rows. 4992 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 4993 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 4994 * <br>2. Incorrect parameter types. 4995 * @throws { BusinessError } 14800000 - Inner error. 4996 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 4997 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 4998 * @systemapi 4999 * @StageModelOnly 5000 * @since 10 5001 */ 5002 /** 5003 * Deletes data from the database based on a specified instance object of RdbPredicates. 5004 * 5005 * @param { string } table - Indicates the target table. 5006 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified delete condition by the instance object 5007 * of {@link dataSharePredicates.DataSharePredicates}. 5008 * @returns { Promise<number> } The number of affected rows. 5009 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 5010 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5011 * <br>2. Incorrect parameter types. 5012 * @throws { BusinessError } 14800000 - Inner error. 5013 * @throws { BusinessError } 14800011 - Database corrupted. 5014 * @throws { BusinessError } 14800014 - Already closed. 5015 * @throws { BusinessError } 14800015 - The database does not respond. 5016 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5017 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5018 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5019 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5020 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5021 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5022 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5023 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5024 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5025 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5026 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5027 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5028 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5029 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5030 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5031 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5032 * @systemapi 5033 * @StageModelOnly 5034 * @since 12 5035 */ 5036 delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise<number>; 5037 5038 /** 5039 * Queries data in the database based on specified conditions. 5040 * 5041 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5042 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5043 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5044 * <br>2. Incorrect parameter types. 5045 * @throws { BusinessError } 14800000 - Inner error. 5046 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5047 * @crossplatform 5048 * @since 10 5049 */ 5050 /** 5051 * Queries data in the database based on specified conditions. 5052 * 5053 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5054 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5055 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5056 * <br>2. Incorrect parameter types. 5057 * @throws { BusinessError } 14800000 - Inner error. 5058 * @throws { BusinessError } 14800014 - Already closed. 5059 * @throws { BusinessError } 14800015 - The database does not respond. 5060 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5061 * @crossplatform 5062 * @since 12 5063 */ 5064 query(predicates: RdbPredicates, callback: AsyncCallback<ResultSet>): void; 5065 5066 /** 5067 * Queries data in the database based on specified conditions. 5068 * 5069 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5070 * @param { Array<string> } columns - The columns to query. If the value is empty array, the query applies to all columns. 5071 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5072 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5073 * <br>2. Incorrect parameter types. 5074 * @throws { BusinessError } 14800000 - Inner error. 5075 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5076 * @since 9 5077 */ 5078 /** 5079 * Queries data in the database based on specified conditions. 5080 * 5081 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5082 * @param { Array<string> } columns - The columns to query. If the value is empty array, the query applies to all columns. 5083 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5084 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5085 * <br>2. Incorrect parameter types. 5086 * @throws { BusinessError } 14800000 - Inner error. 5087 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5088 * @crossplatform 5089 * @since 10 5090 */ 5091 /** 5092 * Queries data in the database based on specified conditions. 5093 * 5094 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5095 * @param { Array<string> } columns - The columns to query. If the value is empty array, the query applies to all columns. 5096 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5097 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5098 * <br>2. Incorrect parameter types. 5099 * @throws { BusinessError } 14800000 - Inner error. 5100 * @throws { BusinessError } 14800014 - Already closed. 5101 * @throws { BusinessError } 14800015 - The database does not respond. 5102 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5103 * @crossplatform 5104 * @since 12 5105 */ 5106 query(predicates: RdbPredicates, columns: Array<string>, callback: AsyncCallback<ResultSet>): void; 5107 5108 /** 5109 * Queries data in the database based on specified conditions. 5110 * 5111 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5112 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 5113 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5114 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5115 * <br>2. Incorrect parameter types. 5116 * @throws { BusinessError } 14800000 - Inner error. 5117 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5118 * @since 9 5119 */ 5120 /** 5121 * Queries data in the database based on specified conditions. 5122 * 5123 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5124 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 5125 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5126 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5127 * <br>2. Incorrect parameter types. 5128 * @throws { BusinessError } 14800000 - Inner error. 5129 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5130 * @crossplatform 5131 * @since 10 5132 */ 5133 /** 5134 * Queries data in the database based on specified conditions. 5135 * 5136 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5137 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 5138 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5139 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5140 * <br>2. Incorrect parameter types. 5141 * @throws { BusinessError } 14800000 - Inner error. 5142 * @throws { BusinessError } 14800014 - Already closed. 5143 * @throws { BusinessError } 14800015 - The database does not respond. 5144 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5145 * @crossplatform 5146 * @since 12 5147 */ 5148 query(predicates: RdbPredicates, columns?: Array<string>): Promise<ResultSet>; 5149 5150 /** 5151 * Queries data in the database based on specified conditions. 5152 * 5153 * @param { string } table - Indicates the target table. 5154 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified query condition by the instance object 5155 * of {@link dataSharePredicates.DataSharePredicates}. 5156 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5157 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5158 * <br>2. Incorrect parameter types. 5159 * @throws { BusinessError } 14800000 - Inner error. 5160 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 5161 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5162 * @systemapi 5163 * @StageModelOnly 5164 * @since 10 5165 */ 5166 /** 5167 * Queries data in the database based on specified conditions. 5168 * 5169 * @param { string } table - Indicates the target table. 5170 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified query condition by the instance object 5171 * of {@link dataSharePredicates.DataSharePredicates}. 5172 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5173 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 5174 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5175 * <br>2. Incorrect parameter types. 5176 * @throws { BusinessError } 14800000 - Inner error. 5177 * @throws { BusinessError } 14800014 - Already closed. 5178 * @throws { BusinessError } 14800015 - The database does not respond. 5179 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5180 * @systemapi 5181 * @StageModelOnly 5182 * @since 12 5183 */ 5184 query(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<ResultSet>): void; 5185 5186 /** 5187 * Queries data in the database based on specified conditions. 5188 * 5189 * @param { string } table - Indicates the target table. 5190 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified query condition by the instance object 5191 * of {@link dataSharePredicates.DataSharePredicates}. 5192 * @param { Array<string> } columns - The columns to query. If the value is empty array, the query applies to all columns. 5193 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5194 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5195 * <br>2. Incorrect parameter types. 5196 * @throws { BusinessError } 14800000 - Inner error. 5197 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 5198 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5199 * @systemapi 5200 * @StageModelOnly 5201 * @since 9 5202 */ 5203 /** 5204 * Queries data in the database based on specified conditions. 5205 * 5206 * @param { string } table - Indicates the target table. 5207 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified query condition by the instance object 5208 * of {@link dataSharePredicates.DataSharePredicates}. 5209 * @param { Array<string> } columns - The columns to query. If the value is empty array, the query applies to all columns. 5210 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5211 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 5212 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5213 * <br>2. Incorrect parameter types. 5214 * @throws { BusinessError } 14800000 - Inner error. 5215 * @throws { BusinessError } 14800014 - Already closed. 5216 * @throws { BusinessError } 14800015 - The database does not respond. 5217 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5218 * @systemapi 5219 * @StageModelOnly 5220 * @since 12 5221 */ 5222 query( 5223 table: string, 5224 predicates: dataSharePredicates.DataSharePredicates, 5225 columns: Array<string>, 5226 callback: AsyncCallback<ResultSet> 5227 ): void; 5228 5229 /** 5230 * Queries data in the database based on specified conditions. 5231 * 5232 * @param { string } table - Indicates the target table. 5233 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified query condition by the instance object 5234 * of {@link dataSharePredicates.DataSharePredicates}. 5235 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 5236 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5237 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5238 * <br>2. Incorrect parameter types. 5239 * @throws { BusinessError } 14800000 - Inner error. 5240 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 5241 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5242 * @systemapi 5243 * @StageModelOnly 5244 * @since 9 5245 */ 5246 /** 5247 * Queries data in the database based on specified conditions. 5248 * 5249 * @param { string } table - Indicates the target table. 5250 * @param { dataSharePredicates.DataSharePredicates } predicates - The specified query condition by the instance object 5251 * of {@link dataSharePredicates.DataSharePredicates}. 5252 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 5253 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5254 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 5255 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5256 * <br>2. Incorrect parameter types. 5257 * @throws { BusinessError } 14800000 - Inner error. 5258 * @throws { BusinessError } 14800014 - Already closed. 5259 * @throws { BusinessError } 14800015 - The database does not respond. 5260 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5261 * @systemapi 5262 * @StageModelOnly 5263 * @since 12 5264 */ 5265 query( 5266 table: string, 5267 predicates: dataSharePredicates.DataSharePredicates, 5268 columns?: Array<string> 5269 ): Promise<ResultSet>; 5270 5271 /** 5272 * Queries data in the database based on specified conditions with sync function. 5273 * 5274 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5275 * @param { Array<string> } columns - The columns to query. If the value is empty array, the query applies to all columns. 5276 * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. 5277 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5278 * <br>2. Incorrect parameter types. 5279 * @throws { BusinessError } 14800000 - Inner error. 5280 * @throws { BusinessError } 14800014 - Already closed. 5281 * @throws { BusinessError } 14800015 - The database does not respond. 5282 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5283 * @crossplatform 5284 * @since 12 5285 */ 5286 querySync(predicates: RdbPredicates, columns?: Array<string>): ResultSet; 5287 5288 /** 5289 * Queries data in the database based on SQL statement. 5290 * 5291 * @param { string } sql - Indicates the SQL statement to execute. 5292 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5293 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5294 * <br>2. Incorrect parameter types. 5295 * @throws { BusinessError } 14800000 - Inner error. 5296 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5297 * @crossplatform 5298 * @since 10 5299 */ 5300 /** 5301 * Queries data in the database based on SQL statement. 5302 * 5303 * @param { string } sql - Indicates the SQL statement to execute. 5304 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5305 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5306 * <br>2. Incorrect parameter types. 5307 * @throws { BusinessError } 14800000 - Inner error. 5308 * @throws { BusinessError } 14800014 - Already closed. 5309 * @throws { BusinessError } 14800015 - The database does not respond. 5310 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5311 * @crossplatform 5312 * @since 12 5313 */ 5314 querySql(sql: string, callback: AsyncCallback<ResultSet>): void; 5315 5316 /** 5317 * Queries data in the database based on SQL statement. 5318 * 5319 * @param { string } sql - Indicates the SQL statement to execute. 5320 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5321 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5322 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5323 * <br>2. Incorrect parameter types. 5324 * @throws { BusinessError } 14800000 - Inner error. 5325 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5326 * @since 9 5327 */ 5328 /** 5329 * Queries data in the database based on SQL statement. 5330 * 5331 * @param { string } sql - Indicates the SQL statement to execute. 5332 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5333 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5334 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5335 * <br>2. Incorrect parameter types. 5336 * @throws { BusinessError } 14800000 - Inner error. 5337 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5338 * @crossplatform 5339 * @since 10 5340 */ 5341 /** 5342 * Queries data in the database based on SQL statement. 5343 * 5344 * @param { string } sql - Indicates the SQL statement to execute. 5345 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5346 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 5347 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5348 * <br>2. Incorrect parameter types. 5349 * @throws { BusinessError } 14800000 - Inner error. 5350 * @throws { BusinessError } 14800014 - Already closed. 5351 * @throws { BusinessError } 14800015 - The database does not respond. 5352 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5353 * @crossplatform 5354 * @since 12 5355 */ 5356 querySql(sql: string, bindArgs: Array<ValueType>, callback: AsyncCallback<ResultSet>): void; 5357 5358 /** 5359 * Queries data in the database based on SQL statement. 5360 * 5361 * @param { string } sql - Indicates the SQL statement to execute. 5362 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5363 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5364 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5365 * <br>2. Incorrect parameter types. 5366 * @throws { BusinessError } 14800000 - Inner error. 5367 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5368 * @since 9 5369 */ 5370 /** 5371 * Queries data in the database based on SQL statement. 5372 * 5373 * @param { string } sql - Indicates the SQL statement to execute. 5374 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5375 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5376 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5377 * <br>2. Incorrect parameter types. 5378 * @throws { BusinessError } 14800000 - Inner error. 5379 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5380 * @crossplatform 5381 * @since 10 5382 */ 5383 /** 5384 * Queries data in the database based on SQL statement. 5385 * 5386 * @param { string } sql - Indicates the SQL statement to execute. 5387 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5388 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 5389 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5390 * <br>2. Incorrect parameter types. 5391 * @throws { BusinessError } 14800000 - Inner error. 5392 * @throws { BusinessError } 14800014 - Already closed. 5393 * @throws { BusinessError } 14800015 - The database does not respond. 5394 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5395 * @crossplatform 5396 * @since 12 5397 */ 5398 querySql(sql: string, bindArgs?: Array<ValueType>): Promise<ResultSet>; 5399 5400 /** 5401 * Queries data in the database based on SQL statement with sync interface. 5402 * 5403 * @param { string } sql - Indicates the SQL statement to execute. 5404 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5405 * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. 5406 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5407 * <br>2. Incorrect parameter types. 5408 * @throws { BusinessError } 14800000 - Inner error. 5409 * @throws { BusinessError } 14800014 - Already closed. 5410 * @throws { BusinessError } 14800015 - The database does not respond. 5411 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5412 * @crossplatform 5413 * @since 12 5414 */ 5415 querySqlSync(sql: string, bindArgs?: Array<ValueType>): ResultSet; 5416 5417 /** 5418 * Obtains the modify time of rows corresponding to the primary keys. 5419 * 5420 * @param { string } table - Indicates the name of the table to check. 5421 * @param { string } columnName - Indicates the name of the column to check. 5422 * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. 5423 * @returns { Promise<ModifyTime> } -The promise returned by the function. ModifyTime indicates the modify time of current row. 5424 * If this table does not support cloud, the {@link ModifyTime} will be empty. 5425 * @throws { BusinessError } 801 - Capability not supported. 5426 * @throws { BusinessError } 14800000 - Inner error. 5427 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. 5428 * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. 5. The PRIKey must be number or string. 5429 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5430 * @since 10 5431 */ 5432 /** 5433 * Obtains the modify time of rows corresponding to the primary keys. 5434 * 5435 * @param { string } table - Indicates the name of the table to check. 5436 * @param { string } columnName - Indicates the name of the column to check. 5437 * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. 5438 * @returns { Promise<ModifyTime> } -The promise returned by the function. ModifyTime indicates the modify time of current row. 5439 * If this table does not support cloud, the {@link ModifyTime} will be empty. 5440 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. 5441 * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. 5. The PRIKey must be number or string. 5442 * @throws { BusinessError } 801 - Capability not supported. 5443 * @throws { BusinessError } 14800000 - Inner error. 5444 * @throws { BusinessError } 14800011 - Database corrupted. 5445 * @throws { BusinessError } 14800014 - Already closed. 5446 * @throws { BusinessError } 14800015 - The database does not respond. 5447 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5448 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5449 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5450 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5451 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5452 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5453 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5454 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5455 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5456 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5457 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5458 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5459 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5460 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5461 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5462 * @since 12 5463 */ 5464 getModifyTime(table: string, columnName: string, primaryKeys: PRIKeyType[]): Promise<ModifyTime>; 5465 5466 /** 5467 * Obtains the modify time of rows corresponding to the primary keys. 5468 * 5469 * @param { string } table - Indicates the name of the table to check. 5470 * @param { string } columnName - Indicates the name of the column to check. 5471 * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. 5472 * @param { AsyncCallback<ModifyTime> } callback - The callback of getModifyTime. ModifyTime indicates the modify time of current row. 5473 * If this table does not support cloud, the {@link ModifyTime} will be empty. 5474 * @throws { BusinessError } 801 - Capability not supported. 5475 * @throws { BusinessError } 14800000 - Inner error. 5476 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. 5477 * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. 5. The PRIKey must be number or string. 5478 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5479 * @since 10 5480 */ 5481 /** 5482 * Obtains the modify time of rows corresponding to the primary keys. 5483 * 5484 * @param { string } table - Indicates the name of the table to check. 5485 * @param { string } columnName - Indicates the name of the column to check. 5486 * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. 5487 * @param { AsyncCallback<ModifyTime> } callback - The callback of getModifyTime. ModifyTime indicates the modify time of current row. 5488 * If this table does not support cloud, the {@link ModifyTime} will be empty. 5489 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. 5490 * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. 5. The PRIKey must be number or string. 5491 * @throws { BusinessError } 801 - Capability not supported. 5492 * @throws { BusinessError } 14800000 - Inner error. 5493 * @throws { BusinessError } 14800011 - Database corrupted. 5494 * @throws { BusinessError } 14800014 - Already closed. 5495 * @throws { BusinessError } 14800015 - The database does not respond. 5496 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5497 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5498 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5499 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5500 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5501 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5502 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5503 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5504 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5505 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5506 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5507 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5508 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5509 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5510 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5511 * @since 12 5512 */ 5513 getModifyTime( 5514 table: string, 5515 columnName: string, 5516 primaryKeys: PRIKeyType[], 5517 callback: AsyncCallback<ModifyTime> 5518 ): void; 5519 5520 /** 5521 * Cleans the dirty data, which is the data deleted in the cloud. 5522 * 5523 * Data with a cursor smaller than the specified cursor will be cleaned up. 5524 * 5525 * @param { string } table - Indicates the name of the table to check. 5526 * @param { number } cursor - Indicates the position of the data to be cleaned up. 5527 * @param { AsyncCallback<void> } callback - Indicates the callback invoked to return the result. 5528 * @throws { BusinessError } 801 - Capability not supported. 5529 * @throws { BusinessError } 14800000 - Inner error. 5530 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5531 * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. 5532 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5533 * @since 11 5534 */ 5535 /** 5536 * Cleans the dirty data, which is the data deleted in the cloud. 5537 * 5538 * Data with a cursor smaller than the specified cursor will be cleaned up. 5539 * 5540 * @param { string } table - Indicates the name of the table to check. 5541 * @param { number } cursor - Indicates the position of the data to be cleaned up. 5542 * @param { AsyncCallback<void> } callback - Indicates the callback invoked to return the result. 5543 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5544 * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. 5545 * @throws { BusinessError } 801 - Capability not supported. 5546 * @throws { BusinessError } 14800000 - Inner error. 5547 * @throws { BusinessError } 14800011 - Database corrupted. 5548 * @throws { BusinessError } 14800014 - Already closed. 5549 * @throws { BusinessError } 14800015 - The database does not respond. 5550 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5551 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5552 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5553 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5554 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5555 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5556 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5557 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5558 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5559 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5560 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5561 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5562 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5563 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5564 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5565 * @since 12 5566 */ 5567 cleanDirtyData(table: string, cursor: number, callback: AsyncCallback<void>): void; 5568 5569 /** 5570 * Cleans all dirty data deleted in the cloud. 5571 * 5572 * @param { string } table - Indicates the name of the table to check. 5573 * @param { AsyncCallback<void> } callback - The callback of clean. 5574 * @throws { BusinessError } 801 - Capability not supported. 5575 * @throws { BusinessError } 14800000 - Inner error. 5576 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5577 * 3. The tablesNames must be not empty string. 5578 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5579 * @since 11 5580 */ 5581 /** 5582 * Cleans all dirty data deleted in the cloud. 5583 * 5584 * @param { string } table - Indicates the name of the table to check. 5585 * @param { AsyncCallback<void> } callback - The callback of clean. 5586 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s). 2. The RdbStore must be not nullptr. 5587 * 3. The tablesNames must be not empty string. 5588 * @throws { BusinessError } 801 - Capability not supported. 5589 * @throws { BusinessError } 14800000 - Inner error. 5590 * @throws { BusinessError } 14800011 - Database corrupted. 5591 * @throws { BusinessError } 14800014 - Already closed. 5592 * @throws { BusinessError } 14800015 - The database does not respond. 5593 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5594 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5595 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5596 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5597 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5598 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5599 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5600 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5601 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5602 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5603 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5604 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5605 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5606 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5607 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5608 * @since 12 5609 */ 5610 cleanDirtyData(table: string, callback: AsyncCallback<void>): void; 5611 5612 /** 5613 * Cleans dirty data deleted in the cloud. 5614 * 5615 * If a cursor is specified, data with a cursor smaller than the specified cursor will be cleaned up. 5616 * otherwise clean all. 5617 * 5618 * @param { string } table - Indicates the name of the table to check. 5619 * @param { number } [cursor] - Indicates the cursor. 5620 * @returns { Promise<void> } -The promise returned by the function. 5621 * @throws { BusinessError } 801 - Capability not supported. 5622 * @throws { BusinessError } 14800000 - Inner error. 5623 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5624 * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. 5625 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5626 * @since 11 5627 */ 5628 /** 5629 * Cleans dirty data deleted in the cloud. 5630 * 5631 * If a cursor is specified, data with a cursor smaller than the specified cursor will be cleaned up. 5632 * otherwise clean all. 5633 * 5634 * @param { string } table - Indicates the name of the table to check. 5635 * @param { number } [cursor] - Indicates the cursor. 5636 * @returns { Promise<void> } -The promise returned by the function. 5637 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5638 * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. 5639 * @throws { BusinessError } 801 - Capability not supported. 5640 * @throws { BusinessError } 14800000 - Inner error. 5641 * @throws { BusinessError } 14800011 - Database corrupted. 5642 * @throws { BusinessError } 14800014 - Already closed. 5643 * @throws { BusinessError } 14800015 - The database does not respond. 5644 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5645 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5646 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5647 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5648 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5649 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5650 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5651 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5652 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5653 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5654 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5655 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5656 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5657 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5658 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5659 * @since 12 5660 */ 5661 cleanDirtyData(table: string, cursor?: number): Promise<void>; 5662 5663 /** 5664 * Obtains sharing resource of rows corresponding to the predicates. 5665 * 5666 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5667 * @param { Array<string> } [columns] - The specified columns to query. 5668 * @returns { Promise<ResultSet> } -The promise returned by the function. 5669 * {@link ResultSet} is query result. 5670 * @throws { BusinessError } 801 - Capability not supported. 5671 * @throws { BusinessError } 14800000 - Inner error. 5672 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5673 * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. 5674 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5675 * @systemapi 5676 * @since 11 5677 */ 5678 /** 5679 * Obtains sharing resource of rows corresponding to the predicates. 5680 * 5681 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5682 * @param { Array<string> } [columns] - The specified columns to query. 5683 * @returns { Promise<ResultSet> } -The promise returned by the function. 5684 * {@link ResultSet} is query result. 5685 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5686 * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. 5687 * @throws { BusinessError } 801 - Capability not supported. 5688 * @throws { BusinessError } 14800000 - Inner error. 5689 * @throws { BusinessError } 14800011 - Database corrupted. 5690 * @throws { BusinessError } 14800014 - Already closed. 5691 * @throws { BusinessError } 14800015 - The database does not respond. 5692 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5693 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5694 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5695 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5696 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5697 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5698 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5699 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5700 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5701 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5702 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5703 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5704 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5705 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5706 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5707 * @systemapi 5708 * @since 12 5709 */ 5710 querySharingResource(predicates: RdbPredicates, columns?: Array<string>): Promise<ResultSet>; 5711 5712 /** 5713 * Obtains sharing resource of rows corresponding to the predicates. 5714 * 5715 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5716 * @param { AsyncCallback<ResultSet> } callback - The callback of querySharingResource. 5717 * {@link ResultSet} is query result. 5718 * @throws { BusinessError } 801 - Capability not supported. 5719 * @throws { BusinessError } 14800000 - Inner error. 5720 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5721 * 3. The predicates must be an RdbPredicates. 5722 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5723 * @systemapi 5724 * @since 11 5725 */ 5726 /** 5727 * Obtains sharing resource of rows corresponding to the predicates. 5728 * 5729 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5730 * @param { AsyncCallback<ResultSet> } callback - The callback of querySharingResource. 5731 * {@link ResultSet} is query result. 5732 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5733 * 3. The predicates must be an RdbPredicates. 5734 * @throws { BusinessError } 801 - Capability not supported. 5735 * @throws { BusinessError } 14800000 - Inner error. 5736 * @throws { BusinessError } 14800011 - Database corrupted. 5737 * @throws { BusinessError } 14800014 - Already closed. 5738 * @throws { BusinessError } 14800015 - The database does not respond. 5739 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5740 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5741 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5742 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5743 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5744 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5745 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5746 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5747 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5748 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5749 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5750 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5751 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5752 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5753 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5754 * @systemapi 5755 * @since 12 5756 */ 5757 querySharingResource(predicates: RdbPredicates, callback: AsyncCallback<ResultSet>): void; 5758 5759 /** 5760 * Obtains sharing resource of rows corresponding to the predicates. 5761 * 5762 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5763 * @param { Array<string> } columns - The specified columns to query. 5764 * @param { AsyncCallback<ResultSet> } callback - The callback of querySharingResource. 5765 * {@link ResultSet} is query result. 5766 * @throws { BusinessError } 801 - Capability not supported. 5767 * @throws { BusinessError } 14800000 - Inner error. 5768 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5769 * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. 5770 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5771 * @systemapi 5772 * @since 11 5773 */ 5774 /** 5775 * Obtains sharing resource of rows corresponding to the predicates. 5776 * 5777 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 5778 * @param { Array<string> } columns - The specified columns to query. 5779 * @param { AsyncCallback<ResultSet> } callback - The callback of querySharingResource. 5780 * {@link ResultSet} is query result. 5781 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. 5782 * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. 5783 * @throws { BusinessError } 801 - Capability not supported. 5784 * @throws { BusinessError } 14800000 - Inner error. 5785 * @throws { BusinessError } 14800011 - Database corrupted. 5786 * @throws { BusinessError } 14800014 - Already closed. 5787 * @throws { BusinessError } 14800015 - The database does not respond. 5788 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5789 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5790 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5791 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5792 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5793 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5794 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5795 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5796 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5797 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5798 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5799 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5800 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5801 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5802 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 5803 * @systemapi 5804 * @since 12 5805 */ 5806 querySharingResource(predicates: RdbPredicates, columns: Array<string>, callback: AsyncCallback<ResultSet>): void; 5807 5808 /** 5809 * Executes a SQL statement that contains specified parameters but returns no value. 5810 * 5811 * @param { string } sql - Indicates the SQL statement to execute. 5812 * @param { AsyncCallback<void> } callback - The callback of executeSql. 5813 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5814 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5815 * <br>2. Incorrect parameter types. 5816 * @throws { BusinessError } 14800000 - Inner error. 5817 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5818 * @crossplatform 5819 * @since 10 5820 */ 5821 /** 5822 * Executes a SQL statement that contains specified parameters but returns no value. 5823 * 5824 * @param { string } sql - Indicates the SQL statement to execute. 5825 * @param { AsyncCallback<void> } callback - The callback of executeSql. 5826 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5827 * <br>2. Incorrect parameter types. 5828 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 5829 * @throws { BusinessError } 14800000 - Inner error. 5830 * @throws { BusinessError } 14800011 - Database corrupted. 5831 * @throws { BusinessError } 14800014 - Already closed. 5832 * @throws { BusinessError } 14800015 - The database does not respond. 5833 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5834 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5835 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5836 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5837 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5838 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5839 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5840 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5841 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5842 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5843 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5844 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5845 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5846 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5847 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5848 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5849 * @crossplatform 5850 * @since 12 5851 */ 5852 executeSql(sql: string, callback: AsyncCallback<void>): void; 5853 5854 /** 5855 * Executes a SQL statement that contains specified parameters but returns no value. 5856 * 5857 * @param { string } sql - Indicates the SQL statement to execute. 5858 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5859 * @param { AsyncCallback<void> } callback - The callback of executeSql. 5860 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5861 * <br>2. Incorrect parameter types. 5862 * @throws { BusinessError } 14800000 - Inner error. 5863 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5864 * @since 9 5865 */ 5866 /** 5867 * Executes a SQL statement that contains specified parameters but returns no value. 5868 * 5869 * @param { string } sql - Indicates the SQL statement to execute. 5870 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5871 * @param { AsyncCallback<void> } callback - The callback of executeSql. 5872 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5873 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5874 * <br>2. Incorrect parameter types. 5875 * @throws { BusinessError } 14800000 - Inner error. 5876 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5877 * @crossplatform 5878 * @since 10 5879 */ 5880 /** 5881 * Executes a SQL statement that contains specified parameters but returns no value. 5882 * 5883 * @param { string } sql - Indicates the SQL statement to execute. 5884 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5885 * @param { AsyncCallback<void> } callback - The callback of executeSql. 5886 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5887 * <br>2. Incorrect parameter types. 5888 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 5889 * @throws { BusinessError } 14800000 - Inner error. 5890 * @throws { BusinessError } 14800011 - Database corrupted. 5891 * @throws { BusinessError } 14800014 - Already closed. 5892 * @throws { BusinessError } 14800015 - The database does not respond. 5893 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5894 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5895 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5896 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5897 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5898 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5899 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5900 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5901 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5902 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5903 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5904 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5905 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5906 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5907 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5908 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5909 * @crossplatform 5910 * @since 12 5911 */ 5912 executeSql(sql: string, bindArgs: Array<ValueType>, callback: AsyncCallback<void>): void; 5913 5914 /** 5915 * Executes a SQL statement that contains specified parameters but returns no value. 5916 * 5917 * @param { string } sql - Indicates the SQL statement to execute. 5918 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5919 * @returns { Promise<void> } The promise returned by the function. 5920 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5921 * <br>2. Incorrect parameter types. 5922 * @throws { BusinessError } 14800000 - Inner error. 5923 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5924 * @since 9 5925 */ 5926 /** 5927 * Executes a SQL statement that contains specified parameters but returns no value. 5928 * 5929 * @param { string } sql - Indicates the SQL statement to execute. 5930 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5931 * @returns { Promise<void> } The promise returned by the function. 5932 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5933 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5934 * <br>2. Incorrect parameter types. 5935 * @throws { BusinessError } 14800000 - Inner error. 5936 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5937 * @crossplatform 5938 * @since 10 5939 */ 5940 /** 5941 * Executes a SQL statement that contains specified parameters but returns no value. 5942 * 5943 * @param { string } sql - Indicates the SQL statement to execute. 5944 * @param { Array<ValueType> } bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5945 * @returns { Promise<void> } The promise returned by the function. 5946 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5947 * <br>2. Incorrect parameter types. 5948 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 5949 * @throws { BusinessError } 14800000 - Inner error. 5950 * @throws { BusinessError } 14800011 - Database corrupted. 5951 * @throws { BusinessError } 14800014 - Already closed. 5952 * @throws { BusinessError } 14800015 - The database does not respond. 5953 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5954 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5955 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5956 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5957 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5958 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5959 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5960 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5961 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5962 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5963 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5964 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5965 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 5966 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 5967 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 5968 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 5969 * @crossplatform 5970 * @since 12 5971 */ 5972 executeSql(sql: string, bindArgs?: Array<ValueType>): Promise<void>; 5973 5974 /** 5975 * Executes a SQL statement that contains specified parameters and returns a value of ValueType. 5976 * 5977 * @param { string } sql - Indicates the SQL statement to execute. 5978 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 5979 * @returns { Promise<ValueType> } The promise returned by the function. 5980 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 5981 * <br>2. Incorrect parameter types. 5982 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 5983 * @throws { BusinessError } 14800000 - Inner error. 5984 * @throws { BusinessError } 14800011 - Database corrupted. 5985 * @throws { BusinessError } 14800014 - Already closed. 5986 * @throws { BusinessError } 14800015 - The database does not respond. 5987 * @throws { BusinessError } 14800021 - SQLite: Generic error. 5988 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 5989 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 5990 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 5991 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 5992 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 5993 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 5994 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 5995 * @throws { BusinessError } 14800029 - SQLite: The database is full. 5996 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 5997 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 5998 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 5999 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6000 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6001 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6002 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6003 * @since 12 6004 */ 6005 execute(sql: string, args?: Array<ValueType>): Promise<ValueType>; 6006 6007 /** 6008 * Executes a SQL statement that contains specified parameters and returns a value of ValueType. 6009 * 6010 * @param { string } sql - Indicates the SQL statement to execute. 6011 * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans or 0. 6012 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6013 * @returns { Promise<ValueType> } The promise returned by the function. 6014 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6015 * <br>2. Incorrect parameter types. 6016 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 6017 * @throws { BusinessError } 14800000 - Inner error. 6018 * @throws { BusinessError } 14800011 - Database corrupted. 6019 * @throws { BusinessError } 14800014 - Already closed. 6020 * @throws { BusinessError } 14800015 - The database does not respond. 6021 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6022 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6023 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6024 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6025 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6026 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6027 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6028 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6029 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6030 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6031 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6032 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6033 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6034 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6035 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6036 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6037 * @since 12 6038 */ 6039 execute(sql: string, txId: number, args?: Array<ValueType>): Promise<ValueType>; 6040 6041 /** 6042 * Executes a SQL statement that contains specified parameters and returns a value of ValueType with sync interface. 6043 * 6044 * @param { string } sql - Indicates the SQL statement to execute. 6045 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 6046 * @returns { ValueType } The promise returned by the function. 6047 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6048 * <br>2. Incorrect parameter types. 6049 * @throws { BusinessError } 14800000 - Inner error. 6050 * @throws { BusinessError } 14800011 - Database corrupted. 6051 * @throws { BusinessError } 14800014 - Already closed. 6052 * @throws { BusinessError } 14800015 - The database does not respond. 6053 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6054 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6055 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6056 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6057 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6058 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6059 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6060 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6061 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6062 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6063 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6064 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6065 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6066 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6067 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6068 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6069 * @crossplatform 6070 * @since 12 6071 */ 6072 executeSync(sql: string, args?: Array<ValueType>): ValueType; 6073 6074 /** 6075 * BeginTransaction before execute your sql. 6076 * 6077 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6078 * @throws { BusinessError } 14800000 - Inner error. 6079 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6080 * @since 9 6081 */ 6082 /** 6083 * BeginTransaction before execute your sql. 6084 * 6085 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6086 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6087 * @throws { BusinessError } 14800000 - Inner error. 6088 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6089 * @crossplatform 6090 * @since 10 6091 */ 6092 /** 6093 * BeginTransaction before execute your sql. 6094 * 6095 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6096 * @throws { BusinessError } 14800000 - Inner error. 6097 * @throws { BusinessError } 14800011 - Database corrupted. 6098 * @throws { BusinessError } 14800014 - Already closed. 6099 * @throws { BusinessError } 14800015 - The database does not respond. 6100 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6101 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6102 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6103 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6104 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6105 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6106 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6107 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6108 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6109 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6110 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6111 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6112 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6113 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6114 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6115 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6116 * @crossplatform 6117 * @since 12 6118 */ 6119 beginTransaction(): void; 6120 6121 /** 6122 * Begins a transaction before executing the SQL statement. 6123 * 6124 * @returns { Promise<number> } Returns the transaction ID. 6125 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6126 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 6127 * @throws { BusinessError } 14800000 - Inner error. 6128 * @throws { BusinessError } 14800011 - Database corrupted. 6129 * @throws { BusinessError } 14800014 - Already closed. 6130 * @throws { BusinessError } 14800015 - The database does not respond. 6131 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6132 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6133 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6134 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6135 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6136 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6137 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6138 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6139 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6140 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6141 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6142 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6143 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6144 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6145 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 6146 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6147 * @since 12 6148 */ 6149 beginTrans(): Promise<number>; 6150 6151 /** 6152 * Commit the the sql you have executed. 6153 * 6154 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6155 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6156 * @since 9 6157 */ 6158 /** 6159 * Commit the the sql you have executed. 6160 * 6161 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6162 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6163 * @crossplatform 6164 * @since 10 6165 */ 6166 /** 6167 * Commit the the sql you have executed. 6168 * 6169 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6170 * @throws { BusinessError } 14800000 - Inner error. 6171 * @throws { BusinessError } 14800011 - Database corrupted. 6172 * @throws { BusinessError } 14800014 - Already closed. 6173 * @throws { BusinessError } 14800015 - The database does not respond. 6174 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6175 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6176 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6177 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6178 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6179 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6180 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6181 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6182 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6183 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6184 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6185 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6186 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6187 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6188 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6189 * @crossplatform 6190 * @since 12 6191 */ 6192 commit(): void; 6193 6194 /** 6195 * Commits the SQL statement executed. 6196 * 6197 * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans. 6198 * @returns { Promise<void> } Promise used to return the result. 6199 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6200 * <br>2. Incorrect parameter types. 6201 * @throws { BusinessError } 14800011 - Database corrupted. 6202 * @throws { BusinessError } 14800000 - Inner error. 6203 * @throws { BusinessError } 14800014 - Already closed. 6204 * @throws { BusinessError } 14800015 - The database does not respond. 6205 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6206 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6207 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6208 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6209 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6210 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6211 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6212 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6213 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6214 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6215 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6216 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6217 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6218 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6219 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6220 * @since 12 6221 */ 6222 commit(txId : number): Promise<void>; 6223 6224 /** 6225 * Roll back the sql you have already executed. 6226 * 6227 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6228 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6229 * @since 9 6230 */ 6231 /** 6232 * Roll back the sql you have already executed. 6233 * 6234 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6235 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6236 * @crossplatform 6237 * @since 10 6238 */ 6239 /** 6240 * Roll back the sql you have already executed. 6241 * 6242 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6243 * @throws { BusinessError } 14800000 - Inner error. 6244 * @throws { BusinessError } 14800011 - Database corrupted. 6245 * @throws { BusinessError } 14800014 - Already closed. 6246 * @throws { BusinessError } 14800015 - The database does not respond. 6247 * @throws { BusinessError } 14800021 - SQLite: Generic error. 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.RelationalStore.Core 6262 * @crossplatform 6263 * @since 12 6264 */ 6265 rollBack(): void; 6266 6267 /** 6268 * Rolls back the SQL statement executed. 6269 * 6270 * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans. 6271 * @returns { Promise<void> } Promise used to return the result. 6272 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6273 * @throws { BusinessError } 14800011 - Database corrupted. 6274 * @throws { BusinessError } 14800000 - Inner error. 6275 * @throws { BusinessError } 14800014 - Already closed. 6276 * @throws { BusinessError } 14800015 - The database does not respond. 6277 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6278 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6279 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6280 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6281 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6282 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6283 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6284 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6285 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6286 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6287 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6288 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6289 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6290 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6291 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6292 * @since 12 6293 */ 6294 rollback(txId : number): Promise<void>; 6295 6296 /** 6297 * Backs up a database in a specified name. 6298 * 6299 * @param { string } destName - Indicates the name that saves the database backup. 6300 * @param { AsyncCallback<void> } callback - The callback of backup. 6301 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6302 * <br>2. Incorrect parameter types. 6303 * @throws { BusinessError } 14800000 - Inner error. 6304 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6305 * @since 9 6306 */ 6307 /** 6308 * Backs up a database in a specified name. 6309 * 6310 * @param { string } destName - Indicates the name that saves the database backup. 6311 * @param { AsyncCallback<void> } callback - The callback of backup. 6312 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6313 * <br>2. Incorrect parameter types. 6314 * @throws { BusinessError } 14800000 - Inner error. 6315 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6316 * @crossplatform 6317 * @since 10 6318 */ 6319 /** 6320 * Backs up a database in a specified name. 6321 * 6322 * @param { string } destName - Indicates the name that saves the database backup. 6323 * @param { AsyncCallback<void> } callback - The callback of backup. 6324 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 6325 * @throws { BusinessError } 14800000 - Inner error. 6326 * @throws { BusinessError } 14800010 - Invalid database path. 6327 * @throws { BusinessError } 14800011 - Database corrupted. 6328 * @throws { BusinessError } 14800014 - Already closed. 6329 * @throws { BusinessError } 14800015 - The database does not respond. 6330 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6331 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6332 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6333 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6334 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6335 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6336 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6337 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6338 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6339 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6340 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6341 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6342 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6343 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6344 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6345 * @crossplatform 6346 * @since 12 6347 */ 6348 backup(destName: string, callback: AsyncCallback<void>): void; 6349 6350 /** 6351 * Backs up a database in a specified name. 6352 * 6353 * @param { string } destName - Indicates the name that saves the database backup. 6354 * @returns { Promise<void> } The promise returned by the function. 6355 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6356 * <br>2. Incorrect parameter types. 6357 * @throws { BusinessError } 14800000 - Inner error. 6358 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6359 * @since 9 6360 */ 6361 /** 6362 * Backs up a database in a specified name. 6363 * 6364 * @param { string } destName - Indicates the name that saves the database backup. 6365 * @returns { Promise<void> } The promise returned by the function. 6366 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6367 * <br>2. Incorrect parameter types. 6368 * @throws { BusinessError } 14800000 - Inner error. 6369 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6370 * @crossplatform 6371 * @since 10 6372 */ 6373 /** 6374 * Backs up a database in a specified name. 6375 * 6376 * @param { string } destName - Indicates the name that saves the database backup. 6377 * @returns { Promise<void> } The promise returned by the function. 6378 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6379 * <br>2. Incorrect parameter types. 6380 * @throws { BusinessError } 14800000 - Inner error. 6381 * @throws { BusinessError } 14800011 - Database corrupted. 6382 * @throws { BusinessError } 14800014 - Already closed. 6383 * @throws { BusinessError } 14800015 - The database does not respond. 6384 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6385 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6386 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6387 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6388 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6389 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6390 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6391 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6392 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6393 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6394 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6395 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6396 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6397 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6398 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6399 * @crossplatform 6400 * @since 12 6401 */ 6402 backup(destName: string): Promise<void>; 6403 6404 /** 6405 * Restores a database from a specified database file. 6406 * 6407 * @param { string } srcName - Indicates the name that saves the database file. 6408 * @param { AsyncCallback<void> } callback - The callback of restore. 6409 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6410 * <br>2. Incorrect parameter types. 6411 * @throws { BusinessError } 14800000 - Inner error. 6412 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6413 * @since 9 6414 */ 6415 /** 6416 * Restores a database from a specified database file. 6417 * 6418 * @param { string } srcName - Indicates the name that saves the database file. 6419 * @param { AsyncCallback<void> } callback - The callback of restore. 6420 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6421 * <br>2. Incorrect parameter types. 6422 * @throws { BusinessError } 14800000 - Inner error. 6423 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6424 * @crossplatform 6425 * @since 10 6426 */ 6427 /** 6428 * Restores a database from a specified database file. 6429 * 6430 * @param { string } srcName - Indicates the name that saves the database file. 6431 * @param { AsyncCallback<void> } callback - The callback of restore. 6432 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6433 * <br>2. Incorrect parameter types. 6434 * @throws { BusinessError } 14800000 - Inner error. 6435 * @throws { BusinessError } 14800011 - Database corrupted. 6436 * @throws { BusinessError } 14800014 - Already closed. 6437 * @throws { BusinessError } 14800015 - The database does not respond. 6438 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6439 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6440 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6441 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6442 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6443 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6444 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6445 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6446 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6447 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6448 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6449 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6450 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6451 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6452 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6453 * @crossplatform 6454 * @since 12 6455 */ 6456 restore(srcName: string, callback: AsyncCallback<void>): void; 6457 6458 /** 6459 * Restores a database from a specified database file. 6460 * 6461 * @param { string } srcName - Indicates the name that saves the database file. 6462 * @returns { Promise<void> } The promise returned by the function. 6463 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6464 * <br>2. Incorrect parameter types. 6465 * @throws { BusinessError } 14800000 - Inner error. 6466 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6467 * @since 9 6468 */ 6469 /** 6470 * Restores a database from a specified database file. 6471 * 6472 * @param { string } srcName - Indicates the name that saves the database file. 6473 * @returns { Promise<void> } The promise returned by the function. 6474 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6475 * <br>2. Incorrect parameter types. 6476 * @throws { BusinessError } 14800000 - Inner error. 6477 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6478 * @crossplatform 6479 * @since 10 6480 */ 6481 /** 6482 * Restores a database from a specified database file. 6483 * 6484 * @param { string } srcName - Indicates the name that saves the database file. 6485 * @returns { Promise<void> } The promise returned by the function. 6486 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6487 * <br>2. Incorrect parameter types. 6488 * @throws { BusinessError } 14800000 - Inner error. 6489 * @throws { BusinessError } 14800011 - Database corrupted. 6490 * @throws { BusinessError } 14800014 - Already closed. 6491 * @throws { BusinessError } 14800015 - The database does not respond. 6492 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6493 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6494 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6495 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6496 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6497 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6498 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6499 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6500 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6501 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6502 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6503 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6504 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6505 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6506 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6507 * @crossplatform 6508 * @since 12 6509 */ 6510 restore(srcName: string): Promise<void>; 6511 6512 /** 6513 * Restores a database from a specified database file. 6514 * 6515 * @returns { Promise<void> } The promise returned by the function. 6516 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 6517 * @throws { BusinessError } 14800000 - Inner error. 6518 * @throws { BusinessError } 14800010 - Invalid database path. 6519 * @throws { BusinessError } 14800011 - Database corrupted. 6520 * @throws { BusinessError } 14800014 - Already closed. 6521 * @throws { BusinessError } 14800015 - The database does not respond. 6522 * @throws { BusinessError } 14800021 - SQLite: Generic error. 6523 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 6524 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 6525 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 6526 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 6527 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 6528 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 6529 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 6530 * @throws { BusinessError } 14800029 - SQLite: The database is full. 6531 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 6532 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 6533 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 6534 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 6535 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 6536 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6537 * @systemapi 6538 * @since 12 6539 */ 6540 restore(): Promise<void>; 6541 6542 /** 6543 * Set table to be distributed table. 6544 * 6545 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6546 * @param { Array<string> } tables - Indicates the table names you want to set. 6547 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 6548 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6549 * <br>2. Incorrect parameter types. 6550 * @throws { BusinessError } 14800000 - Inner error. 6551 * @throws { BusinessError } 801 - Capability not supported. 6552 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6553 * @since 9 6554 */ 6555 /** 6556 * Set table to be distributed table. 6557 * 6558 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6559 * @param { Array<string> } tables - Indicates the table names you want to set. 6560 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 6561 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6562 * <br>2. Incorrect parameter types. 6563 * @throws { BusinessError } 801 - Capability not supported. 6564 * @throws { BusinessError } 14800000 - Inner error. 6565 * @throws { BusinessError } 14800014 - Already closed. 6566 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6567 * @since 12 6568 */ 6569 setDistributedTables(tables: Array<string>, callback: AsyncCallback<void>): void; 6570 6571 /** 6572 * Set table to be distributed table. 6573 * 6574 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6575 * @param { Array<string> } tables - Indicates the table names you want to set. 6576 * @returns { Promise<void> } The promise returned by the function. 6577 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6578 * <br>2. Incorrect parameter types. 6579 * @throws { BusinessError } 14800000 - Inner error. 6580 * @throws { BusinessError } 801 - Capability not supported. 6581 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6582 * @since 9 6583 */ 6584 /** 6585 * Set table to be distributed table. 6586 * 6587 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6588 * @param { Array<string> } tables - Indicates the table names you want to set. 6589 * @returns { Promise<void> } The promise returned by the function. 6590 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6591 * <br>2. Incorrect parameter types. 6592 * @throws { BusinessError } 801 - Capability not supported. 6593 * @throws { BusinessError } 14800000 - Inner error. 6594 * @throws { BusinessError } 14800014 - Already closed. 6595 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6596 * @since 12 6597 */ 6598 setDistributedTables(tables: Array<string>): Promise<void>; 6599 6600 /** 6601 * Set table to be distributed table. 6602 * 6603 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6604 * @param { Array<string> } tables - Indicates the table names you want to set. 6605 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 6606 * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD 6607 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 6608 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6609 * <br>2. Incorrect parameter types. 6610 * @throws { BusinessError } 14800000 - Inner error. 6611 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 6612 * @throws { BusinessError } 801 - Capability not supported. 6613 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6614 * @since 10 6615 */ 6616 /** 6617 * Set table to be distributed table. 6618 * 6619 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6620 * @param { Array<string> } tables - Indicates the table names you want to set. 6621 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 6622 * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. 6623 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 6624 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6625 * <br>2. Incorrect parameter types. 6626 * @throws { BusinessError } 801 - Capability not supported. 6627 * @throws { BusinessError } 14800000 - Inner error. 6628 * @throws { BusinessError } 14800014 - Already closed. 6629 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 6630 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6631 * @since 12 6632 */ 6633 setDistributedTables(tables: Array<string>, type: DistributedType, callback: AsyncCallback<void>): void; 6634 6635 /** 6636 * Set table to be distributed table. 6637 * 6638 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6639 * @param { Array<string> } tables - Indicates the table names you want to set. 6640 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 6641 * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD 6642 * @param { DistributedConfig } config - Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. 6643 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 6644 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6645 * <br>2. Incorrect parameter types. 6646 * @throws { BusinessError } 14800000 - Inner error. 6647 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 6648 * @throws { BusinessError } 801 - Capability not supported. 6649 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6650 * @since 10 6651 */ 6652 /** 6653 * Set table to be distributed table. 6654 * 6655 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6656 * @param { Array<string> } tables - Indicates the table names you want to set. 6657 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 6658 * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. 6659 * @param { DistributedConfig } config - Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. 6660 * @param { AsyncCallback<void> } callback - The callback of setDistributedTables. 6661 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6662 * <br>2. Incorrect parameter types. 6663 * @throws { BusinessError } 801 - Capability not supported. 6664 * @throws { BusinessError } 14800000 - Inner error. 6665 * @throws { BusinessError } 14800014 - Already closed. 6666 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 6667 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6668 * @since 12 6669 */ 6670 setDistributedTables( 6671 tables: Array<string>, 6672 type: DistributedType, 6673 config: DistributedConfig, 6674 callback: AsyncCallback<void> 6675 ): void; 6676 6677 /** 6678 * Set table to be a distributed table. 6679 * 6680 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6681 * @param { Array<string> } tables - Indicates the table names you want to set. 6682 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 6683 * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD 6684 * @param { DistributedConfig } config - Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. 6685 * @returns { Promise<void> } The promise returned by the function. 6686 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6687 * <br>2. Incorrect parameter types. 6688 * @throws { BusinessError } 14800000 - Inner error. 6689 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 6690 * @throws { BusinessError } 801 - Capability not supported. 6691 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6692 * @since 10 6693 */ 6694 /** 6695 * Set table to be a distributed table. 6696 * 6697 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6698 * @param { Array<string> } tables - Indicates the table names you want to set. 6699 * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. 6700 * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. 6701 * @param { DistributedConfig } config - Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. 6702 * @returns { Promise<void> } The promise returned by the function. 6703 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6704 * <br>2. Incorrect parameter types. 6705 * @throws { BusinessError } 801 - Capability not supported. 6706 * @throws { BusinessError } 14800000 - Inner error. 6707 * @throws { BusinessError } 14800014 - Already closed. 6708 * @throws { BusinessError } 14800051 - The type of the distributed table does not match. 6709 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6710 * @since 12 6711 */ 6712 setDistributedTables(tables: Array<string>, type?: DistributedType, config?: DistributedConfig): Promise<void>; 6713 6714 /** 6715 * Obtain distributed table name of specified remote device according to local table name. 6716 * When query remote device database, distributed table name is needed. 6717 * 6718 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6719 * @param { string } device - Indicates the remote device. 6720 * @param { string } table - {string}: the distributed table name. 6721 * @param { AsyncCallback<string> } callback 6722 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6723 * <br>2. Incorrect parameter types. 6724 * @throws { BusinessError } 14800000 - Inner error. 6725 * @throws { BusinessError } 801 - Capability not supported. 6726 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6727 * @since 9 6728 */ 6729 /** 6730 * Obtain distributed table name of specified remote device according to local table name. 6731 * When query remote device database, distributed table name is needed. 6732 * 6733 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6734 * @param { string } device - Indicates the remote device. 6735 * @param { string } table - {string}: the distributed table name. 6736 * @param { AsyncCallback<string> } callback 6737 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6738 * <br>2. Incorrect parameter types. 6739 * @throws { BusinessError } 801 - Capability not supported. 6740 * @throws { BusinessError } 14800000 - Inner error. 6741 * @throws { BusinessError } 14800014 - Already closed. 6742 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6743 * @since 12 6744 */ 6745 obtainDistributedTableName(device: string, table: string, callback: AsyncCallback<string>): void; 6746 6747 /** 6748 * Obtain distributed table name of specified remote device according to local table name. 6749 * When query remote device database, distributed table name is needed. 6750 * 6751 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6752 * @param { string } device - Indicates the remote device. 6753 * @param { string } table 6754 * @returns { Promise<string> } {string}: the distributed table name. 6755 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6756 * <br>2. Incorrect parameter types. 6757 * @throws { BusinessError } 14800000 - Inner error. 6758 * @throws { BusinessError } 801 - Capability not supported. 6759 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6760 * @since 9 6761 */ 6762 /** 6763 * Obtain distributed table name of specified remote device according to local table name. 6764 * When query remote device database, distributed table name is needed. 6765 * 6766 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6767 * @param { string } device - Indicates the remote device. 6768 * @param { string } table 6769 * @returns { Promise<string> } {string}: the distributed table name. 6770 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6771 * <br>2. Incorrect parameter types. 6772 * @throws { BusinessError } 801 - Capability not supported. 6773 * @throws { BusinessError } 14800000 - Inner error. 6774 * @throws { BusinessError } 14800014 - Already closed. 6775 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6776 * @since 12 6777 */ 6778 obtainDistributedTableName(device: string, table: string): Promise<string>; 6779 6780 /** 6781 * Sync data between devices. 6782 * 6783 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6784 * @param { SyncMode } mode - Indicates the database synchronization mode. 6785 * @param { RdbPredicates } predicates - The specified sync condition by the instance object of {@link RdbPredicates}. 6786 * @param { AsyncCallback<Array<[string, number]>> } callback - {Array<[string, number]>}: devices sync status array, 6787 * {string}: device id, 6788 * {number}: device sync status. 6789 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6790 * <br>2. Incorrect parameter types. 6791 * @throws { BusinessError } 14800000 - Inner error. 6792 * @throws { BusinessError } 801 - Capability not supported. 6793 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6794 * @since 9 6795 */ 6796 /** 6797 * Sync data between devices. 6798 * 6799 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6800 * @param { SyncMode } mode - Indicates the database synchronization mode. 6801 * @param { RdbPredicates } predicates - The specified sync condition by the instance object of {@link RdbPredicates}. 6802 * @param { AsyncCallback<Array<[string, number]>> } callback - {Array<[string, number]>}: devices sync status array, 6803 * {string}: device id, 6804 * {number}: device sync status. 6805 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6806 * <br>2. Incorrect parameter types. 6807 * @throws { BusinessError } 801 - Capability not supported. 6808 * @throws { BusinessError } 14800000 - Inner error. 6809 * @throws { BusinessError } 14800014 - Already closed. 6810 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6811 * @since 12 6812 */ 6813 sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback<Array<[string, number]>>): void; 6814 6815 /** 6816 * Sync data between devices. 6817 * 6818 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6819 * @param { SyncMode } mode - Indicates the database synchronization mode. 6820 * @param { RdbPredicates } predicates - The specified sync condition by the instance object of {@link RdbPredicates}. 6821 * @returns { Promise<Array<[string, number]>> } {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 6822 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6823 * <br>2. Incorrect parameter types. 6824 * @throws { BusinessError } 14800000 - Inner error. 6825 * @throws { BusinessError } 801 - Capability not supported. 6826 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6827 * @since 9 6828 */ 6829 /** 6830 * Sync data between devices. 6831 * 6832 * @permission ohos.permission.DISTRIBUTED_DATASYNC 6833 * @param { SyncMode } mode - Indicates the database synchronization mode. 6834 * @param { RdbPredicates } predicates - The specified sync condition by the instance object of {@link RdbPredicates}. 6835 * @returns { Promise<Array<[string, number]>> } {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 6836 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 6837 * <br>2. Incorrect parameter types. 6838 * @throws { BusinessError } 801 - Capability not supported. 6839 * @throws { BusinessError } 14800000 - Inner error. 6840 * @throws { BusinessError } 14800014 - Already closed. 6841 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 6842 * @since 12 6843 */ 6844 sync(mode: SyncMode, predicates: RdbPredicates): Promise<Array<[string, number]>>; 6845 6846 /** 6847 * Sync data to cloud. 6848 * 6849 * @param { SyncMode } mode - indicates the database synchronization mode. 6850 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 6851 * @param { AsyncCallback<void> } callback - {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 6852 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 6853 * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. 5. The callback must be a function. 6854 * @throws { BusinessError } 801 - Capability not supported. 6855 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6856 * @since 10 6857 */ 6858 /** 6859 * Sync data to cloud. 6860 * 6861 * @param { SyncMode } mode - indicates the database synchronization mode. 6862 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 6863 * @param { AsyncCallback<void> } callback - {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 6864 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 6865 * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. 5. The callback must be a function. 6866 * @throws { BusinessError } 801 - Capability not supported. 6867 * @throws { BusinessError } 14800014 - Already closed. 6868 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6869 * @since 12 6870 */ 6871 cloudSync(mode: SyncMode, progress: Callback<ProgressDetails>, callback: AsyncCallback<void>): void; 6872 6873 /** 6874 * Sync data to cloud. 6875 * 6876 * @param { SyncMode } mode - indicates the database synchronization mode. 6877 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 6878 * @returns { Promise<void> } : devices sync status array, {string}: device id, {number}: device sync status. 6879 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 6880 * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. 6881 * @throws { BusinessError } 801 - Capability not supported. 6882 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6883 * @since 10 6884 */ 6885 /** 6886 * Sync data to cloud. 6887 * 6888 * @param { SyncMode } mode - indicates the database synchronization mode. 6889 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 6890 * @returns { Promise<void> } : devices sync status array, {string}: device id, {number}: device sync status. 6891 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 6892 * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. 6893 * @throws { BusinessError } 801 - Capability not supported. 6894 * @throws { BusinessError } 14800014 - Already closed. 6895 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6896 * @since 12 6897 */ 6898 cloudSync(mode: SyncMode, progress: Callback<ProgressDetails>): Promise<void>; 6899 6900 /** 6901 * Sync data to cloud. 6902 * 6903 * @param { SyncMode } mode - indicates the database synchronization mode. 6904 * @param { string[] } tables - indicates the database synchronization mode. 6905 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 6906 * @param { AsyncCallback<void> } callback - {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 6907 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 6908 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 5. The progress must be a callback type. 6909 * 6. The callback must be a function. 6910 * @throws { BusinessError } 801 - Capability not supported. 6911 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6912 * @since 10 6913 */ 6914 /** 6915 * Sync data to cloud. 6916 * 6917 * @param { SyncMode } mode - indicates the database synchronization mode. 6918 * @param { string[] } tables - indicates the database synchronization mode. 6919 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 6920 * @param { AsyncCallback<void> } callback - {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. 6921 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 6922 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 5. The progress must be a callback type. 6923 * 6. The callback must be a function. 6924 * @throws { BusinessError } 801 - Capability not supported. 6925 * @throws { BusinessError } 14800014 - Already closed. 6926 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6927 * @since 12 6928 */ 6929 cloudSync( 6930 mode: SyncMode, 6931 tables: string[], 6932 progress: Callback<ProgressDetails>, 6933 callback: AsyncCallback<void> 6934 ): void; 6935 6936 /** 6937 * Sync data to cloud. 6938 * 6939 * @param { SyncMode } mode - indicates the database synchronization mode. 6940 * @param { string[] } tables - indicates the database synchronization mode. 6941 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 6942 * @returns { Promise<void> } : devices sync status array, {string}: device id, {number}: device sync status. 6943 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 6944 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 5. The progress must be a callback type. 6945 * @throws { BusinessError } 801 - Capability not supported. 6946 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6947 * @since 10 6948 */ 6949 /** 6950 * Sync data to cloud. 6951 * 6952 * @param { SyncMode } mode - indicates the database synchronization mode. 6953 * @param { string[] } tables - indicates the database synchronization mode. 6954 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 6955 * @returns { Promise<void> } : devices sync status array, {string}: device id, {number}: device sync status. 6956 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 6957 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 5. The progress must be a callback type. 6958 * @throws { BusinessError } 801 - Capability not supported. 6959 * @throws { BusinessError } 14800014 - Already closed. 6960 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6961 * @since 12 6962 */ 6963 cloudSync(mode: SyncMode, tables: string[], progress: Callback<ProgressDetails>): Promise<void>; 6964 6965 /** 6966 * Sync data to cloud. 6967 * 6968 * @param { SyncMode } mode - indicates the database synchronization mode. 6969 * @param { RdbPredicates } predicates - The specified sync condition by the instance object of {@link RdbPredicates}. 6970 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 6971 * @param { AsyncCallback<void> } callback - The callback of cloudSync. 6972 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 6973 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 5. The progress must be a callback type. 6974 * 6. The callback must be a function. 6975 * @throws { BusinessError } 202 - if permission verification failed, application which is not a system application uses system API. 6976 * @throws { BusinessError } 801 - Capability not supported. 6977 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6978 * @systemapi 6979 * @since 11 6980 */ 6981 /** 6982 * Sync data to cloud. 6983 * 6984 * @param { SyncMode } mode - indicates the database synchronization mode. 6985 * @param { RdbPredicates } predicates - The specified sync condition by the instance object of {@link RdbPredicates}. 6986 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 6987 * @param { AsyncCallback<void> } callback - The callback of cloudSync. 6988 * @throws { BusinessError } 202 - if permission verification failed, application which is not a system application uses system API. 6989 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 6990 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 5. The progress must be a callback type. 6991 * 6. The callback must be a function. 6992 * @throws { BusinessError } 801 - Capability not supported. 6993 * @throws { BusinessError } 14800014 - Already closed. 6994 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 6995 * @systemapi 6996 * @since 12 6997 */ 6998 cloudSync( 6999 mode: SyncMode, 7000 predicates: RdbPredicates, 7001 progress: Callback<ProgressDetails>, 7002 callback: AsyncCallback<void> 7003 ): void; 7004 7005 /** 7006 * Sync data to cloud. 7007 * 7008 * @param { SyncMode } mode - indicates the database synchronization mode. 7009 * @param { RdbPredicates } predicates - The specified sync condition by the instance object of {@link RdbPredicates}. 7010 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 7011 * @returns { Promise<void> } : The promise returned by the function. 7012 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7013 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 5. The progress must be a callback type. 7014 * @throws { BusinessError } 202 - if permission verification failed, application which is not a system 7015 * application uses system API. 7016 * @throws { BusinessError } 801 - Capability not supported. 7017 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7018 * @systemapi 7019 * @since 11 7020 */ 7021 /** 7022 * Sync data to cloud. 7023 * 7024 * @param { SyncMode } mode - indicates the database synchronization mode. 7025 * @param { RdbPredicates } predicates - The specified sync condition by the instance object of {@link RdbPredicates}. 7026 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 7027 * @returns { Promise<void> } : The promise returned by the function. 7028 * @throws { BusinessError } 202 - if permission verification failed, application which is not a system 7029 * application uses system API. 7030 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. 7031 * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. 5. The progress must be a callback type. 7032 * @throws { BusinessError } 801 - Capability not supported. 7033 * @throws { BusinessError } 14800014 - Already closed. 7034 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client 7035 * @systemapi 7036 * @since 12 7037 */ 7038 cloudSync(mode: SyncMode, predicates: RdbPredicates, progress: Callback<ProgressDetails>): Promise<void>; 7039 7040 /** 7041 * Queries remote data in the database based on specified conditions before Synchronizing Data. 7042 * 7043 * @param { string } device - Indicates specified remote device. 7044 * @param { string } table - Indicates the target table. 7045 * @param { RdbPredicates } predicates - The specified remote remote query condition by the instance object of {@link RdbPredicates}. 7046 * @param { Array<string> } columns - The columns to remote query. If the value is empty array, the remote query applies to all columns. 7047 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 7048 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7049 * <br>2. Incorrect parameter types. 7050 * @throws { BusinessError } 14800000 - Inner error. 7051 * @throws { BusinessError } 801 - Capability not supported. 7052 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7053 * @since 9 7054 */ 7055 /** 7056 * Queries remote data in the database based on specified conditions before Synchronizing Data. 7057 * 7058 * @param { string } device - Indicates specified remote device. 7059 * @param { string } table - Indicates the target table. 7060 * @param { RdbPredicates } predicates - The specified remote remote query condition by the instance object of {@link RdbPredicates}. 7061 * @param { Array<string> } columns - The columns to remote query. If the value is empty array, the remote query applies to all columns. 7062 * @param { AsyncCallback<ResultSet> } callback - The {@link ResultSet} object if the operation is successful. 7063 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7064 * <br>2. Incorrect parameter types. 7065 * @throws { BusinessError } 801 - Capability not supported. 7066 * @throws { BusinessError } 14800000 - Inner error. 7067 * @throws { BusinessError } 14800014 - Already closed. 7068 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7069 * @since 12 7070 */ 7071 remoteQuery( 7072 device: string, 7073 table: string, 7074 predicates: RdbPredicates, 7075 columns: Array<string>, 7076 callback: AsyncCallback<ResultSet> 7077 ): void; 7078 7079 /** 7080 * Queries remote data in the database based on specified conditions before Synchronizing Data. 7081 * 7082 * @param { string } device - Indicates specified remote device. 7083 * @param { string } table - Indicates the target table. 7084 * @param { RdbPredicates } predicates - The specified remote remote query condition by the instance object of {@link RdbPredicates}. 7085 * @param { Array<string> } columns - The columns to remote query. If the value is empty array, the remote query applies to all columns. 7086 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 7087 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7088 * <br>2. Incorrect parameter types. 7089 * @throws { BusinessError } 14800000 - Inner error. 7090 * @throws { BusinessError } 801 - Capability not supported. 7091 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7092 * @since 9 7093 */ 7094 /** 7095 * Queries remote data in the database based on specified conditions before Synchronizing Data. 7096 * 7097 * @param { string } device - Indicates specified remote device. 7098 * @param { string } table - Indicates the target table. 7099 * @param { RdbPredicates } predicates - The specified remote remote query condition by the instance object of {@link RdbPredicates}. 7100 * @param { Array<string> } columns - The columns to remote query. If the value is empty array, the remote query applies to all columns. 7101 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 7102 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7103 * <br>2. Incorrect parameter types. 7104 * @throws { BusinessError } 801 - Capability not supported. 7105 * @throws { BusinessError } 14800000 - Inner error. 7106 * @throws { BusinessError } 14800014 - Already closed. 7107 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7108 * @since 12 7109 */ 7110 remoteQuery(device: string, table: string, predicates: RdbPredicates, columns: Array<string>): Promise<ResultSet>; 7111 7112 /** 7113 * Registers an observer for the database. When data in the distributed database changes, 7114 * the callback will be invoked. 7115 * 7116 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 7117 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 7118 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7119 * @param { Callback<Array<string>> } observer - {Array<string>}: the observer of data change events in the distributed database. 7120 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7121 * <br>2. Incorrect parameter types. 7122 * @throws { BusinessError } 801 - Capability not supported. 7123 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7124 * @since 9 7125 */ 7126 /** 7127 * Registers an observer for the database. When data in the distributed database changes, 7128 * the callback will be invoked. 7129 * 7130 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 7131 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 7132 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7133 * @param { Callback<Array<string>> } observer - {Array<string>}: the observer of data change events in the distributed database. 7134 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7135 * <br>2. Incorrect parameter types. 7136 * @throws { BusinessError } 801 - Capability not supported. 7137 * @throws { BusinessError } 14800014 - Already closed. 7138 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7139 * @since 12 7140 */ 7141 on(event: 'dataChange', type: SubscribeType, observer: Callback<Array<string>>): void; 7142 7143 /** 7144 * Registers an observer for the database. When data in the distributed database or the local database changes, 7145 * the callback will be invoked. 7146 * 7147 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 7148 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 7149 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7150 * If its value is SUBSCRIBE_TYPE_LOCAL_DETAILS, the callback will be invoked for data changes in the local database. 7151 * @param { Callback<Array<string>> | Callback<Array<ChangeInfo>> } observer 7152 * {Array<string>}: The observer of data change events in the distributed database. 7153 * {Array<ChangeInfo>}: The change info of data change events in the distributed database or the local database. 7154 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7155 * <br>2. Incorrect parameter types. 7156 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 7157 * @throws { BusinessError } 801 - Capability not supported. 7158 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7159 * @since 10 7160 */ 7161 /** 7162 * Registers an observer for the database. When data in the distributed database changes, 7163 * the callback will be invoked. 7164 * 7165 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 7166 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 7167 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7168 * @param { Callback<Array<string>> | Callback<Array<ChangeInfo>> } observer 7169 * {Array<string>}: The observer of data change events in the distributed database. 7170 * {Array<ChangeInfo>}: The change info of data change events in the distributed database. 7171 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 7172 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7173 * <br>2. Incorrect parameter types. 7174 * @throws { BusinessError } 801 - Capability not supported. 7175 * @throws { BusinessError } 14800014 - Already closed. 7176 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7177 * @since 12 7178 */ 7179 on(event: 'dataChange', type: SubscribeType, observer: Callback<Array<string>> | Callback<Array<ChangeInfo>>): void; 7180 7181 /** 7182 * Registers an observer for the database. 7183 * 7184 * @param { string } event - Indicates the subscription event. 7185 * @param { boolean } interProcess - Indicates whether it is an interprocess subscription or an in-process subscription. 7186 * @param { Callback<void> } observer - The observer of data change events in the database. 7187 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7188 * <br>2. Incorrect parameter types. 7189 * @throws { BusinessError } 801 - Capability not supported. 7190 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 7191 * @throws { BusinessError } 14800000 - Inner error. 7192 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7193 * @since 10 7194 */ 7195 /** 7196 * Registers an observer for the database. 7197 * 7198 * @param { string } event - Indicates the subscription event. 7199 * @param { boolean } interProcess - Indicates whether it is an interprocess subscription or an in-process subscription. 7200 * @param { Callback<void> } observer - The observer of data change events in the database. 7201 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7202 * <br>2. Incorrect parameter types. 7203 * @throws { BusinessError } 801 - Capability not supported. 7204 * @throws { BusinessError } 14800000 - Inner error. 7205 * @throws { BusinessError } 14800014 - Already closed. 7206 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 7207 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7208 * @since 12 7209 */ 7210 on(event: string, interProcess: boolean, observer: Callback<void>): void; 7211 7212 /** 7213 * Register an automatic synchronization callback to the database. 7214 * 7215 * @param { 'autoSyncProgress' } event - Indicates the event must be string 'autoSyncProgress'. 7216 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 7217 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 3 parameter(s)! 2. The RdbStore must be valid. 7218 * 3. The event must be a not empty string. 4. The progress must be function. 7219 * @throws { BusinessError } 801 - Capability not supported. 7220 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7221 * @since 11 7222 */ 7223 /** 7224 * Register an automatic synchronization callback to the database. 7225 * 7226 * @param { 'autoSyncProgress' } event - Indicates the event must be string 'autoSyncProgress'. 7227 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 7228 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 2 - 3 parameter(s)! 2. The RdbStore must be valid. 7229 * 3. The event must be a not empty string. 4. The progress must be function. 7230 * @throws { BusinessError } 801 - Capability not supported. 7231 * @throws { BusinessError } 14800014 - Already closed. 7232 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7233 * @since 12 7234 */ 7235 on(event: 'autoSyncProgress', progress: Callback<ProgressDetails>): void; 7236 7237 /** 7238 * Subscribes to the SQL statistics. 7239 * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. 7240 * @param { Callback<SqlExecutionInfo> } observer - Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. 7241 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. 7242 * @throws { BusinessError } 801 - Capability not supported. 7243 * @throws { BusinessError } 14800000 - Inner error. 7244 * @throws { BusinessError } 14800014 - Already closed. 7245 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7246 * @since 12 7247 */ 7248 on(event: 'statistics', observer: Callback<SqlExecutionInfo> ): void; 7249 7250 /** 7251 * Remove specified observer of specified type from the database. 7252 * 7253 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 7254 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 7255 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7256 * @param { Callback<Array<string>> } observer - {Array<string>}: the data change observer already registered. 7257 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7258 * <br>2. Incorrect parameter types. 7259 * @throws { BusinessError } 801 - Capability not supported. 7260 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7261 * @since 9 7262 */ 7263 /** 7264 * Remove specified observer of specified type from the database. 7265 * 7266 * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. 7267 * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. 7268 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7269 * @param { Callback<Array<string>> } observer - {Array<string>}: the data change observer already registered. 7270 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7271 * <br>2. Incorrect parameter types. 7272 * @throws { BusinessError } 801 - Capability not supported. 7273 * @throws { BusinessError } 14800014 - Already closed. 7274 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7275 * @since 12 7276 */ 7277 off(event: 'dataChange', type: SubscribeType, observer: Callback<Array<string>>): void; 7278 7279 /** 7280 * Remove specified observer of specified type from the database. 7281 * 7282 * @param { 'dataChange' } event - indicates the event must be string 'dataChange'. 7283 * @param { SubscribeType } type - indicates the subscription type, which is defined in {@link SubscribeType}. 7284 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7285 * @param { Callback<Array<string>> | Callback<Array<ChangeInfo>> } observer - {Array<string>}: the data change observer already registered. 7286 * {Array<ChangeInfo>}: the change info already registered. 7287 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7288 * <br>2. Incorrect parameter types. 7289 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 7290 * @throws { BusinessError } 801 - Capability not supported. 7291 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7292 * @since 10 7293 */ 7294 /** 7295 * Remove specified observer of specified type from the database. 7296 * 7297 * @param { 'dataChange' } event - indicates the event must be string 'dataChange'. 7298 * @param { SubscribeType } type - indicates the subscription type, which is defined in {@link SubscribeType}. 7299 * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. 7300 * @param { Callback<Array<string>> | Callback<Array<ChangeInfo>> } observer - {Array<string>}: the data change observer already registered. 7301 * {Array<ChangeInfo>}: the change info already registered. 7302 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 7303 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7304 * <br>2. Incorrect parameter types. 7305 * @throws { BusinessError } 801 - Capability not supported. 7306 * @throws { BusinessError } 14800014 - Already closed. 7307 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7308 * @since 12 7309 */ 7310 off( 7311 event: 'dataChange', 7312 type: SubscribeType, 7313 observer?: Callback<Array<string>> | Callback<Array<ChangeInfo>> 7314 ): void; 7315 7316 /** 7317 * Remove specified observer of specified type from the database. 7318 * 7319 * @param { string } event - Indicates the subscription event. 7320 * @param { boolean } interProcess - Indicates whether it is an interprocess subscription or an in-process subscription. 7321 * @param { Callback<void> } observer - The data change observer already registered. 7322 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7323 * <br>2. Incorrect parameter types. 7324 * @throws { BusinessError } 801 - Capability not supported. 7325 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 7326 * @throws { BusinessError } 14800000 - Inner error. 7327 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7328 * @since 10 7329 */ 7330 /** 7331 * Remove specified observer of specified type from the database. 7332 * 7333 * @param { string } event - Indicates the subscription event. 7334 * @param { boolean } interProcess - Indicates whether it is an interprocess subscription or an in-process subscription. 7335 * @param { Callback<void> } observer - The data change observer already registered. 7336 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7337 * <br>2. Incorrect parameter types. 7338 * @throws { BusinessError } 801 - Capability not supported. 7339 * @throws { BusinessError } 14800000 - Inner error. 7340 * @throws { BusinessError } 14800014 - Already closed. 7341 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 7342 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7343 * @since 12 7344 */ 7345 off(event: string, interProcess: boolean, observer?: Callback<void>): void; 7346 7347 /** 7348 * Unregister the database auto synchronization callback. 7349 * 7350 * @param { 'autoSyncProgress' } event - indicates the event must be string 'autoSyncProgress'. 7351 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 7352 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be valid. 7353 * 3. The event must be a not empty string. 4. The progress must be function. 7354 * @throws { BusinessError } 801 - Capability not supported. 7355 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7356 * @since 11 7357 */ 7358 /** 7359 * Unregister the database auto synchronization callback. 7360 * 7361 * @param { 'autoSyncProgress' } event - indicates the event must be string 'autoSyncProgress'. 7362 * @param { Callback<ProgressDetails> } progress - the specified sync condition by the instance object of {@link ProgressDetails}. 7363 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be valid. 7364 * 3. The event must be a not empty string. 4. The progress must be function. 7365 * @throws { BusinessError } 801 - Capability not supported. 7366 * @throws { BusinessError } 14800014 - Already closed. 7367 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7368 * @since 12 7369 */ 7370 off(event: 'autoSyncProgress', progress?: Callback<ProgressDetails>): void; 7371 7372 /** 7373 * Unsubscribes from the SQL statistics. 7374 * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. 7375 * @param { Callback<SqlExecutionInfo> } observer - Indicates the callback to unregister. 7376 * @throws { BusinessError } 401 - Parameter error. 7377 * @throws { BusinessError } 801 - Capability not supported. 7378 * @throws { BusinessError } 14800000 - Inner error. 7379 * @throws { BusinessError } 14800014 - Already closed. 7380 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7381 * @since 12 7382 */ 7383 off(event: 'statistics', observer?: Callback<SqlExecutionInfo> ): void; 7384 7385 /** 7386 * Notifies the registered observers of a change to the data resource specified by Uri. 7387 * 7388 * @param { string } event - Indicates the subscription event. 7389 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7390 * <br>2. Incorrect parameter types. 7391 * @throws { BusinessError } 801 - Capability not supported. 7392 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 7393 * @throws { BusinessError } 14800000 - Inner error. 7394 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7395 * @since 10 7396 */ 7397 /** 7398 * Notifies the registered observers of a change to the data resource specified by Uri. 7399 * 7400 * @param { string } event - Indicates the subscription event. 7401 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7402 * <br>2. Incorrect parameter types. 7403 * @throws { BusinessError } 801 - Capability not supported. 7404 * @throws { BusinessError } 14800000 - Inner error. 7405 * @throws { BusinessError } 14800014 - Already closed. 7406 * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. 7407 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7408 * @since 12 7409 */ 7410 emit(event: string): void; 7411 7412 /** 7413 * Close the RdbStore and all resultSets. 7414 * 7415 * @returns { Promise<void> } The promise returned by the function. 7416 * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. 7417 * @throws { BusinessError } 14800000 - Inner error. 7418 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7419 * @since 12 7420 */ 7421 close(): Promise<void>; 7422 7423 /** 7424 * Attaches a database file to the currently linked database. 7425 * 7426 * @param { string } fullPath - Indicates the path of the database file to attach. 7427 * @param { string } attachName - Indicates the alias of the database. 7428 * @param { number } waitTime - Indicates the maximum time allowed for attaching the database file. 7429 * @returns { Promise<number> } Promise used to return the number of attached databases. 7430 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7431 * <br>2. Incorrect parameter types. 7432 * @throws { BusinessError } 801 - Capability not supported. 7433 * @throws { BusinessError } 14800000 - Inner error. 7434 * @throws { BusinessError } 14800010 - Invalid database path. 7435 * @throws { BusinessError } 14800011 - Database corrupted. 7436 * @throws { BusinessError } 14800014 - Already closed. 7437 * @throws { BusinessError } 14800015 - The database does not respond. 7438 * @throws { BusinessError } 14800016 - The database alias already exists. 7439 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7440 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7441 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7442 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7443 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7444 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7445 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7446 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7447 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7448 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7449 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7450 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7451 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7452 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7453 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7454 * @since 12 7455 */ 7456 attach(fullPath: string, attachName: string, waitTime?: number) : Promise<number>; 7457 7458 /** 7459 * Attaches a database file to the currently linked database. 7460 * 7461 * @param { Context } context - Indicates the context of an application or ability. 7462 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 7463 * @param { string } attachName - Indicates the alias of the database. 7464 * @param { number } waitTime - Indicates the maximum time allowed for attaching the database file. 7465 * @returns { Promise<number> } Promise used to return the number of attached databases. 7466 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7467 * <br>2. Incorrect parameter types. 7468 * @throws { BusinessError } 801 - Capability not supported. 7469 * @throws { BusinessError } 14800000 - Inner error. 7470 * @throws { BusinessError } 14800010 - Invalid database path. 7471 * @throws { BusinessError } 14800011 - Database corrupted. 7472 * @throws { BusinessError } 14800014 - Already closed. 7473 * @throws { BusinessError } 14800015 - The database does not respond. 7474 * @throws { BusinessError } 14800016 - The database alias already exists. 7475 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 7476 * @throws { BusinessError } 14801002 - Invalid data group ID. 7477 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7478 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7479 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7480 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7481 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7482 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7483 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7484 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7485 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7486 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7487 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7488 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7489 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7490 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7491 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7492 * @since 12 7493 */ 7494 attach(context: Context, config: StoreConfig, attachName: string, waitTime?: number) : Promise<number>; 7495 7496 /** 7497 * Detaches a database from this database. 7498 * 7499 * @param { string } attachName - Indicates the alias of the database. 7500 * @param { number } waitTime - Indicates the maximum time allowed for detaching the database. 7501 * @returns { Promise<number> } Return the current number of attached databases. 7502 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7503 * <br>2. Incorrect parameter types. 7504 * @throws { BusinessError } 14800000 - Inner error. 7505 * @throws { BusinessError } 14800011 - Database corrupted. 7506 * @throws { BusinessError } 14800014 - Already closed. 7507 * @throws { BusinessError } 14800015 - The database does not respond. 7508 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7509 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7510 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7511 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7512 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7513 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7514 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7515 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7516 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7517 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7518 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7519 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7520 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7521 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7522 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7523 * @since 12 7524 */ 7525 detach(attachName: string, waitTime?: number) : Promise<number>; 7526 7527 /** 7528 * Locks data from the database based on a specified instance object of RdbPredicates. 7529 * 7530 * @param { RdbPredicates } predicates - The specified lock condition by the instance object of {@link RdbPredicates}. 7531 * @returns { Promise<void> } The promise returned by the function. 7532 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7533 * <br>2. Incorrect parameter types. 7534 * @throws { BusinessError } 14800000 - Inner error. 7535 * @throws { BusinessError } 14800011 - Database corrupted. 7536 * @throws { BusinessError } 14800014 - Already closed. 7537 * @throws { BusinessError } 14800015 - The database does not respond. 7538 * @throws { BusinessError } 14800018 - No data meets the condition. 7539 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7540 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7541 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7542 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7543 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7544 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7545 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7546 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7547 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7548 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7549 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7550 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7551 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7552 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7553 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7554 * @crossplatform 7555 * @since 12 7556 */ 7557 lockRow(predicates: RdbPredicates): Promise<void>; 7558 7559 /** 7560 * Unlocks data from the database based on a specified instance object of RdbPredicates. 7561 * 7562 * @param { RdbPredicates } predicates - The specified Unlock condition by the instance object of {@link RdbPredicates}. 7563 * @returns { Promise<void> } The promise returned by the function. 7564 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7565 * <br>2. Incorrect parameter types. 7566 * @throws { BusinessError } 14800000 - Inner error. 7567 * @throws { BusinessError } 14800011 - Database corrupted. 7568 * @throws { BusinessError } 14800014 - Already closed. 7569 * @throws { BusinessError } 14800015 - The database does not respond. 7570 * @throws { BusinessError } 14800018 - No data meets the condition. 7571 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7572 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7573 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7574 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7575 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7576 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7577 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7578 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7579 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7580 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7581 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7582 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7583 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7584 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7585 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7586 * @crossplatform 7587 * @since 12 7588 */ 7589 unlockRow(predicates: RdbPredicates): Promise<void>; 7590 7591 /** 7592 * Queries locked data in the database based on specified conditions. 7593 * 7594 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 7595 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 7596 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 7597 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7598 * <br>2. Incorrect parameter types. 7599 * @throws { BusinessError } 14800000 - Inner error. 7600 * @throws { BusinessError } 14800011 - Database corrupted. 7601 * @throws { BusinessError } 14800014 - Already closed. 7602 * @throws { BusinessError } 14800015 - The database does not respond. 7603 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7604 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7605 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7606 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7607 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7608 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7609 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7610 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7611 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7612 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7613 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7614 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7615 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7616 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7617 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7618 * @crossplatform 7619 * @since 12 7620 */ 7621 queryLockedRow(predicates: RdbPredicates, columns?: Array<string>): Promise<ResultSet>; 7622 7623 /** 7624 * Lock cloud container before non-auto cloud sync. 7625 * 7626 * @returns { Promise<number> } The expired time of the lock. 7627 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 7628 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7629 * @systemapi 7630 * @since 12 7631 */ 7632 lockCloudContainer(): Promise<number>; 7633 7634 /** 7635 * Unlock cloud container. 7636 * 7637 * @returns { Promise<void> } The promise returned by the function. 7638 * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. 7639 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7640 * @systemapi 7641 * @since 12 7642 */ 7643 unlockCloudContainer(): Promise<void>; 7644 7645 /** 7646 * create a transaction instance and begin. 7647 * 7648 * @param { TransactionOptions } options - The option for creating transactions. 7649 * @returns { Promise<Transaction> } The {@link Transaction} object if the operation is successful. 7650 * @throws { BusinessError } 14800000 - Inner error. 7651 * @throws { BusinessError } 14800011 - Database corrupted. 7652 * @throws { BusinessError } 14800014 - Already closed. 7653 * @throws { BusinessError } 14800015 - The database is busy. 7654 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7655 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7656 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7657 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7658 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7659 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 7660 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7661 * @crossplatform 7662 * @since 14 7663 */ 7664 createTransaction(options?: TransactionOptions): Promise<Transaction>; 7665 } 7666 7667 /** 7668 * Provides transactional methods for managing the relational database (RDB). 7669 * 7670 * @interface Transaction 7671 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7672 * @crossplatform 7673 * @since 14 7674 */ 7675 interface Transaction { 7676 /** 7677 * commit the transaction. 7678 * 7679 * @returns { Promise<void> } Promise used to return the result. 7680 * @throws { BusinessError } 14800000 - Inner error. 7681 * @throws { BusinessError } 14800011 - Database corrupted. 7682 * @throws { BusinessError } 14800014 - Already closed. 7683 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7684 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7685 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7686 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7687 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7688 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7689 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7690 * @crossplatform 7691 * @since 14 7692 */ 7693 commit(): Promise<void>; 7694 7695 /** 7696 * rollback the transaction. 7697 * 7698 * @returns { Promise<void> } Promise used to return the result. 7699 * @throws { BusinessError } 14800000 - Inner error. 7700 * @throws { BusinessError } 14800011 - Database corrupted. 7701 * @throws { BusinessError } 14800014 - Already closed. 7702 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7703 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7704 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7705 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7706 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7707 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7708 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7709 * @crossplatform 7710 * @since 14 7711 */ 7712 rollback(): Promise<void>; 7713 7714 /** 7715 * Inserts a row of data into the target table. 7716 * 7717 * @param { string } table - Indicates the target table. 7718 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 7719 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 7720 * @returns { Promise<number> } The row ID if the operation is successful. return -1 otherwise. 7721 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7722 * <br>2. Incorrect parameter types. 7723 * @throws { BusinessError } 14800000 - Inner error. 7724 * @throws { BusinessError } 14800011 - Database corrupted. 7725 * @throws { BusinessError } 14800014 - Already closed. 7726 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7727 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7728 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7729 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7730 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7731 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7732 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7733 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7734 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7735 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7736 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 7737 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7738 * @crossplatform 7739 * @since 14 7740 */ 7741 insert(table: string, values: ValuesBucket, conflict?: ConflictResolution): Promise<number>; 7742 7743 /** 7744 * Inserts a row of data into the target table with sync interface, just use in TaskPool or Worker. 7745 * 7746 * @param { string } table - Indicates the target table. 7747 * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. 7748 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 7749 * @returns { number } The row ID if the operation is successful. return -1 otherwise. 7750 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7751 * <br>2. Incorrect parameter types. 7752 * @throws { BusinessError } 14800000 - Inner error. 7753 * @throws { BusinessError } 14800011 - Database corrupted. 7754 * @throws { BusinessError } 14800014 - Already closed. 7755 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7756 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7757 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7758 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7759 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7760 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7761 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7762 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7763 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7764 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7765 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 7766 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7767 * @crossplatform 7768 * @since 14 7769 */ 7770 insertSync(table: string, values: ValuesBucket | sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; 7771 7772 /** 7773 * Inserts a batch of data into the target table. 7774 * 7775 * @param { string } table - Indicates the target table. 7776 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 7777 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. returns -1 otherwise. 7778 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7779 * <br>2. Incorrect parameter types. 7780 * @throws { BusinessError } 14800000 - Inner error. 7781 * @throws { BusinessError } 14800011 - Database corrupted. 7782 * @throws { BusinessError } 14800014 - Already closed. 7783 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7784 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7785 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7786 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7787 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7788 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7789 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7790 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7791 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7792 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7793 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 7794 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7795 * @crossplatform 7796 * @since 14 7797 */ 7798 batchInsert(table: string, values: Array<ValuesBucket>): Promise<number>; 7799 7800 /** 7801 * Inserts a batch of data into the target table. 7802 * 7803 * @param { string } table - Indicates the target table. 7804 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 7805 * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. 7806 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7807 * <br>2. Incorrect parameter types. 7808 * @throws { BusinessError } 14800000 - Inner error. 7809 * @throws { BusinessError } 14800011 - Database corrupted. 7810 * @throws { BusinessError } 14800014 - Already closed. 7811 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7812 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7813 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7814 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7815 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7816 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7817 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7818 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7819 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7820 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7821 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 7822 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7823 * @crossplatform 7824 * @since 14 7825 */ 7826 batchInsertSync(table: string, values: Array<ValuesBucket>): number; 7827 7828 /** 7829 * Inserts a batch of data into the target table. 7830 * 7831 * @param { string } table - Indicates the target table. 7832 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 7833 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 7834 * @returns { Promise<number> } The number of values that were inserted if the operation is successful. returns -1 otherwise. 7835 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7836 * <br>2. Incorrect parameter types. 7837 * @throws { BusinessError } 14800000 - Inner error. 7838 * @throws { BusinessError } 14800011 - Database corrupted. 7839 * @throws { BusinessError } 14800014 - Already closed. 7840 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7841 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7842 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7843 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7844 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7845 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7846 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7847 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7848 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7849 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7850 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7851 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7852 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7853 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 7854 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7855 * @crossplatform 7856 * @since 18 7857 */ 7858 batchInsertWithConflictResolution(table: string, values: Array<ValuesBucket>, conflict: ConflictResolution): Promise<number>; 7859 7860 /** 7861 * Inserts a batch of data into the target table. 7862 * 7863 * @param { string } table - Indicates the target table. 7864 * @param { Array<ValuesBucket> } values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. 7865 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 7866 * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. 7867 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7868 * <br>2. Incorrect parameter types. 7869 * @throws { BusinessError } 14800000 - Inner error. 7870 * @throws { BusinessError } 14800011 - Database corrupted. 7871 * @throws { BusinessError } 14800014 - Already closed. 7872 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7873 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 7874 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7875 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7876 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7877 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7878 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7879 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7880 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7881 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7882 * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. 7883 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7884 * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. 7885 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 7886 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7887 * @crossplatform 7888 * @since 18 7889 */ 7890 batchInsertWithConflictResolutionSync(table: string, values: Array<ValuesBucket>, conflict: ConflictResolution): number; 7891 7892 /** 7893 * Updates data in the database based on a specified instance object of RdbPredicates. 7894 * 7895 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 7896 * The key-value pairs are associated with column names of the database table. 7897 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 7898 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 7899 * @returns { Promise<number> } The number of affected rows. 7900 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7901 * <br>2. Incorrect parameter types. 7902 * @throws { BusinessError } 14800000 - Inner error. 7903 * @throws { BusinessError } 14800011 - Database corrupted. 7904 * @throws { BusinessError } 14800014 - Already closed. 7905 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7906 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7907 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7908 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7909 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7910 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7911 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7912 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7913 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7914 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7915 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 7916 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7917 * @crossplatform 7918 * @since 14 7919 */ 7920 update(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): Promise<number>; 7921 7922 /** 7923 * Updates data in the database based on a specified instance object of RdbPredicates with sync interface. 7924 * 7925 * @param { ValuesBucket } values - Indicates the row of data to be updated in the database. 7926 * The key-value pairs are associated with column names of the database table. 7927 * @param { RdbPredicates } predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. 7928 * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. 7929 * @returns { number } The number of affected rows. 7930 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7931 * <br>2. Incorrect parameter types. 7932 * @throws { BusinessError } 14800000 - Inner error. 7933 * @throws { BusinessError } 14800011 - Database corrupted. 7934 * @throws { BusinessError } 14800014 - Already closed. 7935 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7936 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7937 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7938 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7939 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7940 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7941 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7942 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7943 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7944 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7945 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 7946 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7947 * @crossplatform 7948 * @since 14 7949 */ 7950 updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number; 7951 7952 /** 7953 * Deletes data from the database based on a specified instance object of RdbPredicates. 7954 * 7955 * @param { RdbPredicates } predicates - The specified delete condition by the instance object of {@link RdbPredicates}. 7956 * @returns { Promise<number> } return the number of affected rows. 7957 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7958 * <br>2. Incorrect parameter types. 7959 * @throws { BusinessError } 14800000 - Inner error. 7960 * @throws { BusinessError } 14800011 - Database corrupted. 7961 * @throws { BusinessError } 14800014 - Already closed. 7962 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7963 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7964 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7965 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7966 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7967 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7968 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7969 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7970 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7971 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7972 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 7973 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 7974 * @crossplatform 7975 * @since 14 7976 */ 7977 delete(predicates: RdbPredicates): Promise<number>; 7978 7979 /** 7980 * Deletes data from the database based on a specified instance object of RdbPredicates with sync interface. 7981 * 7982 * @param { RdbPredicates } predicates - The specified delete condition by the instance object of {@link RdbPredicates}. 7983 * @returns { number } return the number of affected rows. 7984 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 7985 * <br>2. Incorrect parameter types. 7986 * @throws { BusinessError } 14800000 - Inner error. 7987 * @throws { BusinessError } 14800011 - Database corrupted. 7988 * @throws { BusinessError } 14800014 - Already closed. 7989 * @throws { BusinessError } 14800021 - SQLite: Generic error. 7990 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 7991 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 7992 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 7993 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 7994 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 7995 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 7996 * @throws { BusinessError } 14800029 - SQLite: The database is full. 7997 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 7998 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 7999 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8000 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8001 * @crossplatform 8002 * @since 14 8003 */ 8004 deleteSync(predicates: RdbPredicates): number; 8005 8006 /** 8007 * Queries data in the database based on specified conditions. 8008 * 8009 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 8010 * @param { Array<string> } columns - The columns to query. If the value is null, the query applies to all columns. 8011 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 8012 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8013 * <br>2. Incorrect parameter types. 8014 * @throws { BusinessError } 14800000 - Inner error. 8015 * @throws { BusinessError } 14800011 - Database corrupted. 8016 * @throws { BusinessError } 14800014 - Already closed. 8017 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8018 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8019 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8020 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8021 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8022 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8023 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8024 * @crossplatform 8025 * @since 14 8026 */ 8027 query(predicates: RdbPredicates, columns?: Array<string>): Promise<ResultSet>; 8028 8029 /** 8030 * Queries data in the database based on specified conditions with sync function. 8031 * 8032 * @param { RdbPredicates } predicates - The specified query condition by the instance object of {@link RdbPredicates}. 8033 * @param { Array<string> } columns - The columns to query. If the value is empty array, the query applies to all columns. 8034 * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. 8035 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8036 * <br>2. Incorrect parameter types. 8037 * @throws { BusinessError } 14800000 - Inner error. 8038 * @throws { BusinessError } 14800011 - Database corrupted. 8039 * @throws { BusinessError } 14800014 - Already closed. 8040 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8041 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8042 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8043 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8044 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8045 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8046 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8047 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8048 * @crossplatform 8049 * @since 14 8050 */ 8051 querySync(predicates: RdbPredicates, columns?: Array<string>): ResultSet; 8052 8053 /** 8054 * Queries data in the database based on SQL statement. 8055 * 8056 * @param { string } sql - Indicates the SQL statement to execute. 8057 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 8058 * @returns { Promise<ResultSet> } The {@link ResultSet} object if the operation is successful. 8059 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8060 * <br>2. Incorrect parameter types. 8061 * @throws { BusinessError } 14800000 - Inner error. 8062 * @throws { BusinessError } 14800011 - Database corrupted. 8063 * @throws { BusinessError } 14800014 - Already closed. 8064 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8065 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8066 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8067 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8068 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8069 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8070 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8071 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8072 * @crossplatform 8073 * @since 14 8074 */ 8075 querySql(sql: string, args?: Array<ValueType>): Promise<ResultSet>; 8076 8077 /** 8078 * Queries data in the database based on SQL statement with sync interface. 8079 * 8080 * @param { string } sql - Indicates the SQL statement to execute. 8081 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 8082 * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. 8083 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8084 * <br>2. Incorrect parameter types. 8085 * @throws { BusinessError } 14800000 - Inner error. 8086 * @throws { BusinessError } 14800011 - Database corrupted. 8087 * @throws { BusinessError } 14800014 - Already closed. 8088 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8089 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8090 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8091 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8092 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8093 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8094 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8095 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8096 * @crossplatform 8097 * @since 14 8098 */ 8099 querySqlSync(sql: string, args?: Array<ValueType>): ResultSet; 8100 8101 /** 8102 * Executes a SQL statement that contains specified parameters and returns a value of ValueType. 8103 * 8104 * @param { string } sql - Indicates the SQL statement to execute. 8105 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 8106 * @returns { Promise<ValueType> } The promise returned by the function. 8107 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8108 * <br>2. Incorrect parameter types. 8109 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 8110 * @throws { BusinessError } 14800000 - Inner error. 8111 * @throws { BusinessError } 14800011 - Database corrupted. 8112 * @throws { BusinessError } 14800014 - Already closed. 8113 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8114 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8115 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8116 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8117 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8118 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8119 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8120 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8121 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8122 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8123 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8124 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8125 * @since 14 8126 */ 8127 execute(sql: string, args?: Array<ValueType>): Promise<ValueType>; 8128 8129 /** 8130 * Executes a SQL statement that contains specified parameters and returns a value of ValueType with sync interface. 8131 * 8132 * @param { string } sql - Indicates the SQL statement to execute. 8133 * @param { Array<ValueType> } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. 8134 * @returns { ValueType } The promise returned by the function. 8135 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8136 * <br>2. Incorrect parameter types. 8137 * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). 8138 * @throws { BusinessError } 14800000 - Inner error. 8139 * @throws { BusinessError } 14800011 - Database corrupted. 8140 * @throws { BusinessError } 14800014 - Already closed. 8141 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8142 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8143 * @throws { BusinessError } 14800024 - SQLite: The database file is locked. 8144 * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. 8145 * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. 8146 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8147 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8148 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8149 * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. 8150 * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. 8151 * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. 8152 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8153 * @crossplatform 8154 * @since 14 8155 */ 8156 executeSync(sql: string, args?: Array<ValueType>): ValueType; 8157 } 8158 8159 /** 8160 * Obtains a RDB store. 8161 * You can set parameters of the RDB store as required. In general, this method is recommended 8162 * to obtain a rdb store. 8163 * 8164 * @param { Context } context - Indicates the context of an application or ability. 8165 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8166 * @param { AsyncCallback<RdbStore> } callback - The RDB store {@link RdbStore}. 8167 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8168 * <br>2. Incorrect parameter types. 8169 * @throws { BusinessError } 14800000 - Inner error. 8170 * @throws { BusinessError } 14800010 - Failed to open or delete database by invalid database path. 8171 * @throws { BusinessError } 14800011 - Failed to open database by database corrupted. 8172 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8173 * @since 9 8174 */ 8175 /** 8176 * Obtains a RDB store. 8177 * You can set parameters of the RDB store as required. In general, this method is recommended 8178 * to obtain a rdb store. 8179 * 8180 * @param { Context } context - Indicates the context of an application or ability. 8181 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8182 * @param { AsyncCallback<RdbStore> } callback - The RDB store {@link RdbStore}. 8183 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8184 * <br>2. Incorrect parameter types. 8185 * @throws { BusinessError } 14800000 - Inner error. 8186 * @throws { BusinessError } 14800010 - Failed to open or delete database by invalid database path. 8187 * @throws { BusinessError } 14800011 - Failed to open database by database corrupted. 8188 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 8189 * @throws { BusinessError } 14801002 - Invalid data group ID. 8190 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8191 * @crossplatform 8192 * @since 10 8193 */ 8194 /** 8195 * Obtains a RDB store. 8196 * You can set parameters of the RDB store as required. In general, this method is recommended 8197 * to obtain a rdb store. 8198 * 8199 * @param { Context } context - Indicates the context of an application or ability. 8200 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8201 * @param { AsyncCallback<RdbStore> } callback - The RDB store {@link RdbStore}. 8202 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8203 * <br>2. Incorrect parameter types. 8204 * @throws { BusinessError } 14800000 - Inner error. 8205 * @throws { BusinessError } 14800010 - Invalid database path. 8206 * @throws { BusinessError } 14800011 - Database corrupted. 8207 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 8208 * @throws { BusinessError } 14801002 - Invalid data group ID. 8209 * @throws { BusinessError } 14800017 - Config changed. 8210 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8211 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8212 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8213 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8214 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8215 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8216 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8217 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8218 * @crossplatform 8219 * @since 12 8220 */ 8221 /** 8222 * Obtains a RDB store. 8223 * You can set parameters of the RDB store as required. In general, this method is recommended 8224 * to obtain a rdb store. 8225 * 8226 * @param { Context } context - Indicates the context of an application or ability. 8227 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8228 * @param { AsyncCallback<RdbStore> } callback - The RDB store {@link RdbStore}. 8229 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8230 * <br>2. Incorrect parameter types. 8231 * @throws { BusinessError } 14800000 - Inner error. 8232 * @throws { BusinessError } 14800010 - Invalid database path. 8233 * @throws { BusinessError } 14800011 - Database corrupted. 8234 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 8235 * @throws { BusinessError } 14801002 - Invalid data group ID. 8236 * @throws { BusinessError } 14800017 - Config changed. 8237 * @throws { BusinessError } 14800020 - The secret key is corrupted or lost. 8238 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8239 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8240 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8241 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8242 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8243 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8244 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8245 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8246 * @crossplatform 8247 * @since 14 8248 */ 8249 function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback<RdbStore>): void; 8250 8251 /** 8252 * Obtains a RDB store. 8253 * You can set parameters of the RDB store as required. In general, this method is recommended 8254 * to obtain a rdb store. 8255 * 8256 * @param { Context } context - Indicates the context of an application or ability. 8257 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8258 * @returns { Promise<RdbStore> } The RDB store {@link RdbStore}. 8259 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8260 * <br>2. Incorrect parameter types. 8261 * @throws { BusinessError } 14800000 - Inner error. 8262 * @throws { BusinessError } 14800010 - Failed to open or delete database by invalid database path. 8263 * @throws { BusinessError } 14800011 - Failed to open database by database corrupted. 8264 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8265 * @since 9 8266 */ 8267 /** 8268 * Obtains a RDB store. 8269 * You can set parameters of the RDB store as required. In general, this method is recommended 8270 * to obtain a rdb store. 8271 * 8272 * @param { Context } context - Indicates the context of an application or ability. 8273 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8274 * @returns { Promise<RdbStore> } The RDB store {@link RdbStore}. 8275 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8276 * <br>2. Incorrect parameter types. 8277 * @throws { BusinessError } 14800000 - Inner error. 8278 * @throws { BusinessError } 14800010 - Failed to open or delete database by invalid database path. 8279 * @throws { BusinessError } 14800011 - Failed to open database by database corrupted. 8280 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 8281 * @throws { BusinessError } 14801002 - Invalid data group ID. 8282 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8283 * @crossplatform 8284 * @since 10 8285 */ 8286 /** 8287 * Obtains a RDB store. 8288 * You can set parameters of the RDB store as required. In general, this method is recommended 8289 * to obtain a rdb store. 8290 * 8291 * @param { Context } context - Indicates the context of an application or ability. 8292 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8293 * @returns { Promise<RdbStore> } The RDB store {@link RdbStore}. 8294 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8295 * <br>2. Incorrect parameter types. 8296 * @throws { BusinessError } 14800000 - Inner error. 8297 * @throws { BusinessError } 14800010 - Invalid database path. 8298 * @throws { BusinessError } 14800011 - Database corrupted. 8299 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 8300 * @throws { BusinessError } 14801002 - Invalid data group ID. 8301 * @throws { BusinessError } 14800017 - Config changed. 8302 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8303 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8304 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8305 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8306 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8307 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8308 * @crossplatform 8309 * @since 12 8310 */ 8311 /** 8312 * Obtains a RDB store. 8313 * You can set parameters of the RDB store as required. In general, this method is recommended 8314 * to obtain a rdb store. 8315 * 8316 * @param { Context } context - Indicates the context of an application or ability. 8317 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8318 * @returns { Promise<RdbStore> } The RDB store {@link RdbStore}. 8319 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8320 * <br>2. Incorrect parameter types. 8321 * @throws { BusinessError } 14800000 - Inner error. 8322 * @throws { BusinessError } 14800010 - Invalid database path. 8323 * @throws { BusinessError } 14800011 - Database corrupted. 8324 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 8325 * @throws { BusinessError } 14801002 - Invalid data group ID. 8326 * @throws { BusinessError } 14800017 - Config changed. 8327 * @throws { BusinessError } 14800020 - The secret key is corrupted or lost. 8328 * @throws { BusinessError } 14800021 - SQLite: Generic error. 8329 * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. 8330 * @throws { BusinessError } 14800023 - SQLite: Access permission denied. 8331 * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. 8332 * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. 8333 * @throws { BusinessError } 14800029 - SQLite: The database is full. 8334 * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. 8335 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8336 * @crossplatform 8337 * @since 14 8338 */ 8339 function getRdbStore(context: Context, config: StoreConfig): Promise<RdbStore>; 8340 8341 /** 8342 * Deletes the database with a specified name. 8343 * When specify custom directory, this function should not be called. 8344 * 8345 * @param { Context } context - Indicates the context of application or capability. 8346 * @param { string } name - Indicates the database name. 8347 * @param { AsyncCallback<void> } callback - The callback of deleteRdbStore. 8348 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8349 * <br>2. Incorrect parameter types. 8350 * @throws { BusinessError } 14800000 - Inner error. 8351 * @throws { BusinessError } 14800010 - Failed to open or delete database by invalid database path. 8352 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8353 * @since 9 8354 */ 8355 /** 8356 * Deletes the database with a specified name. 8357 * When specify custom directory, this function should not be called. 8358 * 8359 * @param { Context } context - Indicates the context of application or capability. 8360 * @param { string } name - Indicates the database name. 8361 * @param { AsyncCallback<void> } callback - The callback of deleteRdbStore. 8362 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8363 * <br>2. Incorrect parameter types. 8364 * @throws { BusinessError } 14800000 - Inner error. 8365 * @throws { BusinessError } 14800010 - Failed to open or delete database by invalid database path. 8366 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8367 * @crossplatform 8368 * @since 10 8369 */ 8370 function deleteRdbStore(context: Context, name: string, callback: AsyncCallback<void>): void; 8371 8372 /** 8373 * Deletes the database with a specified store config. 8374 * When specify custom directory, this function should be called. 8375 * 8376 * @param { Context } context - Indicates the context of an application or ability. 8377 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8378 * @param { AsyncCallback<void> } callback - The callback of deleteRdbStore. 8379 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8380 * <br>2. Incorrect parameter types. 8381 * @throws { BusinessError } 14800000 - Inner error. 8382 * @throws { BusinessError } 14800010 - Failed to open or delete database by invalid database path. 8383 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 8384 * @throws { BusinessError } 14801002 - Invalid data group ID. 8385 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8386 * @crossplatform 8387 * @since 10 8388 */ 8389 function deleteRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback<void>): void; 8390 8391 /** 8392 * Deletes the database with a specified name. 8393 * When specify custom directory, this function should not be called. 8394 * 8395 * @param { Context } context - Indicates the context of application or capability. 8396 * @param { string } name - Indicates the database name. 8397 * @returns { Promise<void> } The promise returned by the function. 8398 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8399 * <br>2. Incorrect parameter types. 8400 * @throws { BusinessError } 14800000 - Inner error. 8401 * @throws { BusinessError } 14800010 - Failed to open or delete database by invalid database path. 8402 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8403 * @since 9 8404 */ 8405 /** 8406 * Deletes the database with a specified name. 8407 * When specify custom directory, this function should not be called. 8408 * 8409 * @param { Context } context - Indicates the context of application or capability. 8410 * @param { string } name - Indicates the database name. 8411 * @returns { Promise<void> } The promise returned by the function. 8412 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8413 * <br>2. Incorrect parameter types. 8414 * @throws { BusinessError } 14800000 - Inner error. 8415 * @throws { BusinessError } 14800010 - Failed to open or delete database by invalid database path. 8416 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8417 * @crossplatform 8418 * @since 10 8419 */ 8420 /** 8421 * Deletes the database with a specified name. 8422 * When specify custom directory, this function should not be called. 8423 * 8424 * @param { Context } context - Indicates the context of application or capability. 8425 * @param { string } name - Indicates the database name. 8426 * @returns { Promise<void> } The promise returned by the function. 8427 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8428 * <br>2. Incorrect parameter types. 8429 * @throws { BusinessError } 14800000 - Inner error. 8430 * @throws { BusinessError } 14800010 - Invalid database path. 8431 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8432 * @crossplatform 8433 * @since 12 8434 */ 8435 function deleteRdbStore(context: Context, name: string): Promise<void>; 8436 8437 /** 8438 * Deletes the database with a specified store config. 8439 * When specify custom directory, this function should be called. 8440 * 8441 * @param { Context } context - Indicates the context of an application or ability. 8442 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8443 * @returns { Promise<void> } The promise returned by the function. 8444 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8445 * <br>2. Incorrect parameter types. 8446 * @throws { BusinessError } 14800000 - Inner error. 8447 * @throws { BusinessError } 14800010 - Failed to open or delete database by invalid database path. 8448 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 8449 * @throws { BusinessError } 14801002 - Invalid data group ID. 8450 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8451 * @crossplatform 8452 * @since 10 8453 */ 8454 /** 8455 * Deletes the database with a specified store config. 8456 * When specify custom directory, this function should be called. 8457 * 8458 * @param { Context } context - Indicates the context of an application or ability. 8459 * @param { StoreConfig } config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. 8460 * @returns { Promise<void> } The promise returned by the function. 8461 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 8462 * <br>2. Incorrect parameter types. 8463 * @throws { BusinessError } 801 - Capability not supported. 8464 * @throws { BusinessError } 14800000 - Inner error. 8465 * @throws { BusinessError } 14800010 - Invalid database path. 8466 * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. 8467 * @throws { BusinessError } 14801002 - Invalid data group ID. 8468 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8469 * @crossplatform 8470 * @since 12 8471 */ 8472 function deleteRdbStore(context: Context, config: StoreConfig): Promise<void>; 8473 8474 /** 8475 * Checks whether the vector database is supported. 8476 * 8477 * @returns { boolean } Returns {@code true} if the vector database is supported; returns {@code false} otherwise. 8478 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8479 * @since 18 8480 */ 8481 function isVectorSupported(): boolean; 8482 8483 /** 8484 * check the {@link Tokenizer} tokenizer type is supported or not on current system. 8485 * @param { tokenizer } type - Indicates Tokenizer which want to check. 8486 * @returns { boolean } Returns {@code true} if the tokenizer is supported; returns {@code false} otherwise. 8487 * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types 8488 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core 8489 * @since 18 8490 */ 8491 function isTokenizerSupported(tokenizer: Tokenizer): boolean; 8492} 8493 8494export default relationalStore; 8495