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