You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/kotlin/io/appwrite/services/Databases.kt
+42
Original file line number
Diff line number
Diff line change
@@ -497,15 +497,18 @@ class Databases(client: Client) : Service(client) {
497
497
* @param key Attribute Key.
498
498
* @param required Is attribute required?
499
499
* @param default Default value for attribute when not provided. Cannot be set when attribute is required.
500
+
* @param newKey New attribute key.
500
501
* @return [io.appwrite.models.AttributeBoolean]
501
502
*/
503
+
@JvmOverloads
502
504
@Throws(AppwriteException::class)
503
505
suspendfunupdateBooleanAttribute(
504
506
databaseId:String,
505
507
collectionId:String,
506
508
key:String,
507
509
required:Boolean,
508
510
default:Boolean? = null,
511
+
newKey:String? = null,
509
512
): io.appwrite.models.AttributeBoolean {
510
513
val apiPath ="/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}"
511
514
.replace("{databaseId}", databaseId)
@@ -515,6 +518,7 @@ class Databases(client: Client) : Service(client) {
515
518
val apiParams = mutableMapOf<String, Any?>(
516
519
"required" to required,
517
520
"default" to default,
521
+
"newKey" to newKey,
518
522
)
519
523
val apiHeaders =mutableMapOf(
520
524
"content-type" to "application/json",
@@ -591,15 +595,18 @@ class Databases(client: Client) : Service(client) {
591
595
* @param key Attribute Key.
592
596
* @param required Is attribute required?
593
597
* @param default Default value for attribute when not provided. Cannot be set when attribute is required.
598
+
* @param newKey New attribute key.
594
599
* @return [io.appwrite.models.AttributeDatetime]
595
600
*/
601
+
@JvmOverloads
596
602
@Throws(AppwriteException::class)
597
603
suspendfunupdateDatetimeAttribute(
598
604
databaseId:String,
599
605
collectionId:String,
600
606
key:String,
601
607
required:Boolean,
602
608
default:String? = null,
609
+
newKey:String? = null,
603
610
): io.appwrite.models.AttributeDatetime {
604
611
val apiPath ="/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}"
605
612
.replace("{databaseId}", databaseId)
@@ -609,6 +616,7 @@ class Databases(client: Client) : Service(client) {
609
616
val apiParams = mutableMapOf<String, Any?>(
610
617
"required" to required,
611
618
"default" to default,
619
+
"newKey" to newKey,
612
620
)
613
621
val apiHeaders =mutableMapOf(
614
622
"content-type" to "application/json",
@@ -685,15 +693,18 @@ class Databases(client: Client) : Service(client) {
685
693
* @param key Attribute Key.
686
694
* @param required Is attribute required?
687
695
* @param default Default value for attribute when not provided. Cannot be set when attribute is required.
696
+
* @param newKey New attribute key.
688
697
* @return [io.appwrite.models.AttributeEmail]
689
698
*/
699
+
@JvmOverloads
690
700
@Throws(AppwriteException::class)
691
701
suspendfunupdateEmailAttribute(
692
702
databaseId:String,
693
703
collectionId:String,
694
704
key:String,
695
705
required:Boolean,
696
706
default:String? = null,
707
+
newKey:String? = null,
697
708
): io.appwrite.models.AttributeEmail {
698
709
val apiPath ="/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}"
699
710
.replace("{databaseId}", databaseId)
@@ -703,6 +714,7 @@ class Databases(client: Client) : Service(client) {
703
714
val apiParams = mutableMapOf<String, Any?>(
704
715
"required" to required,
705
716
"default" to default,
717
+
"newKey" to newKey,
706
718
)
707
719
val apiHeaders =mutableMapOf(
708
720
"content-type" to "application/json",
@@ -783,8 +795,10 @@ class Databases(client: Client) : Service(client) {
783
795
* @param elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.
784
796
* @param required Is attribute required?
785
797
* @param default Default value for attribute when not provided. Cannot be set when attribute is required.
798
+
* @param newKey New attribute key.
786
799
* @return [io.appwrite.models.AttributeEnum]
787
800
*/
801
+
@JvmOverloads
788
802
@Throws(AppwriteException::class)
789
803
suspendfunupdateEnumAttribute(
790
804
databaseId:String,
@@ -793,6 +807,7 @@ class Databases(client: Client) : Service(client) {
793
807
elements:List<String>,
794
808
required:Boolean,
795
809
default:String? = null,
810
+
newKey:String? = null,
796
811
): io.appwrite.models.AttributeEnum {
797
812
val apiPath ="/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}"
798
813
.replace("{databaseId}", databaseId)
@@ -803,6 +818,7 @@ class Databases(client: Client) : Service(client) {
803
818
"elements" to elements,
804
819
"required" to required,
805
820
"default" to default,
821
+
"newKey" to newKey,
806
822
)
807
823
val apiHeaders =mutableMapOf(
808
824
"content-type" to "application/json",
@@ -887,8 +903,10 @@ class Databases(client: Client) : Service(client) {
887
903
* @param min Minimum value to enforce on new documents
888
904
* @param max Maximum value to enforce on new documents
889
905
* @param default Default value for attribute when not provided. Cannot be set when attribute is required.
906
+
* @param newKey New attribute key.
890
907
* @return [io.appwrite.models.AttributeFloat]
891
908
*/
909
+
@JvmOverloads
892
910
@Throws(AppwriteException::class)
893
911
suspendfunupdateFloatAttribute(
894
912
databaseId:String,
@@ -898,6 +916,7 @@ class Databases(client: Client) : Service(client) {
898
916
min:Double,
899
917
max:Double,
900
918
default:Double? = null,
919
+
newKey:String? = null,
901
920
): io.appwrite.models.AttributeFloat {
902
921
val apiPath ="/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}"
903
922
.replace("{databaseId}", databaseId)
@@ -909,6 +928,7 @@ class Databases(client: Client) : Service(client) {
909
928
"min" to min,
910
929
"max" to max,
911
930
"default" to default,
931
+
"newKey" to newKey,
912
932
)
913
933
val apiHeaders =mutableMapOf(
914
934
"content-type" to "application/json",
@@ -993,8 +1013,10 @@ class Databases(client: Client) : Service(client) {
993
1013
* @param min Minimum value to enforce on new documents
994
1014
* @param max Maximum value to enforce on new documents
995
1015
* @param default Default value for attribute when not provided. Cannot be set when attribute is required.
1016
+
* @param newKey New attribute key.
996
1017
* @return [io.appwrite.models.AttributeInteger]
997
1018
*/
1019
+
@JvmOverloads
998
1020
@Throws(AppwriteException::class)
999
1021
suspendfunupdateIntegerAttribute(
1000
1022
databaseId:String,
@@ -1004,6 +1026,7 @@ class Databases(client: Client) : Service(client) {
1004
1026
min:Long,
1005
1027
max:Long,
1006
1028
default:Long? = null,
1029
+
newKey:String? = null,
1007
1030
): io.appwrite.models.AttributeInteger {
1008
1031
val apiPath ="/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}"
1009
1032
.replace("{databaseId}", databaseId)
@@ -1015,6 +1038,7 @@ class Databases(client: Client) : Service(client) {
1015
1038
"min" to min,
1016
1039
"max" to max,
1017
1040
"default" to default,
1041
+
"newKey" to newKey,
1018
1042
)
1019
1043
val apiHeaders =mutableMapOf(
1020
1044
"content-type" to "application/json",
@@ -1091,15 +1115,18 @@ class Databases(client: Client) : Service(client) {
1091
1115
* @param key Attribute Key.
1092
1116
* @param required Is attribute required?
1093
1117
* @param default Default value for attribute when not provided. Cannot be set when attribute is required.
1118
+
* @param newKey New attribute key.
1094
1119
* @return [io.appwrite.models.AttributeIp]
1095
1120
*/
1121
+
@JvmOverloads
1096
1122
@Throws(AppwriteException::class)
1097
1123
suspendfunupdateIpAttribute(
1098
1124
databaseId:String,
1099
1125
collectionId:String,
1100
1126
key:String,
1101
1127
required:Boolean,
1102
1128
default:String? = null,
1129
+
newKey:String? = null,
1103
1130
): io.appwrite.models.AttributeIp {
1104
1131
val apiPath ="/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}"
1105
1132
.replace("{databaseId}", databaseId)
@@ -1109,6 +1136,7 @@ class Databases(client: Client) : Service(client) {
1109
1136
val apiParams = mutableMapOf<String, Any?>(
1110
1137
"required" to required,
1111
1138
"default" to default,
1139
+
"newKey" to newKey,
1112
1140
)
1113
1141
val apiHeaders =mutableMapOf(
1114
1142
"content-type" to "application/json",
@@ -1246,15 +1274,20 @@ class Databases(client: Client) : Service(client) {
1246
1274
* @param key Attribute Key.
1247
1275
* @param required Is attribute required?
1248
1276
* @param default Default value for attribute when not provided. Cannot be set when attribute is required.
1277
+
* @param size Maximum size of the string attribute.
1278
+
* @param newKey New attribute key.
1249
1279
* @return [io.appwrite.models.AttributeString]
1250
1280
*/
1281
+
@JvmOverloads
1251
1282
@Throws(AppwriteException::class)
1252
1283
suspendfunupdateStringAttribute(
1253
1284
databaseId:String,
1254
1285
collectionId:String,
1255
1286
key:String,
1256
1287
required:Boolean,
1257
1288
default:String? = null,
1289
+
size:Long? = null,
1290
+
newKey:String? = null,
1258
1291
): io.appwrite.models.AttributeString {
1259
1292
val apiPath ="/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}"
1260
1293
.replace("{databaseId}", databaseId)
@@ -1264,6 +1297,8 @@ class Databases(client: Client) : Service(client) {
1264
1297
val apiParams = mutableMapOf<String, Any?>(
1265
1298
"required" to required,
1266
1299
"default" to default,
1300
+
"size" to size,
1301
+
"newKey" to newKey,
1267
1302
)
1268
1303
val apiHeaders =mutableMapOf(
1269
1304
"content-type" to "application/json",
@@ -1340,15 +1375,18 @@ class Databases(client: Client) : Service(client) {
1340
1375
* @param key Attribute Key.
1341
1376
* @param required Is attribute required?
1342
1377
* @param default Default value for attribute when not provided. Cannot be set when attribute is required.
1378
+
* @param newKey New attribute key.
1343
1379
* @return [io.appwrite.models.AttributeUrl]
1344
1380
*/
1381
+
@JvmOverloads
1345
1382
@Throws(AppwriteException::class)
1346
1383
suspendfunupdateUrlAttribute(
1347
1384
databaseId:String,
1348
1385
collectionId:String,
1349
1386
key:String,
1350
1387
required:Boolean,
1351
1388
default:String? = null,
1389
+
newKey:String? = null,
1352
1390
): io.appwrite.models.AttributeUrl {
1353
1391
val apiPath ="/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}"
1354
1392
.replace("{databaseId}", databaseId)
@@ -1358,6 +1396,7 @@ class Databases(client: Client) : Service(client) {
1358
1396
val apiParams = mutableMapOf<String, Any?>(
1359
1397
"required" to required,
1360
1398
"default" to default,
1399
+
"newKey" to newKey,
1361
1400
)
1362
1401
val apiHeaders =mutableMapOf(
1363
1402
"content-type" to "application/json",
@@ -1454,6 +1493,7 @@ class Databases(client: Client) : Service(client) {
1454
1493
* @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
0 commit comments