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