Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb19c89d

Browse files
make recordfn:key-value-pair extensible (#2406)
1 parent36fae18 commitb19c89d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎basex-core/src/main/java/org/basex/query/value/type/SeqType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public final class SeqType {
236236
TokenObjectMap<RecordField>map =newTokenObjectMap<>();
237237
map.put(Str.KEY.string(),newRecordField(false,SeqType.ANY_ATOMIC_TYPE_O));
238238
map.put(Str.VALUE.string(),newRecordField(false,SeqType.ITEM_ZM));
239-
PAIR =newRecordType(false,map,null);
239+
PAIR =newRecordType(true,map,null);
240240
map =newTokenObjectMap<>();
241241
map.put(Str.VALUE.string(),newRecordField(false,SeqType.ITEM_ZM));
242242
MEMBER =newRecordType(false,map,null);

‎basex-core/src/test/java/org/basex/query/func/MapModuleTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,8 @@ record = "declare record local:x(x as xs:integer, *);";
452452

453453
check(func.args(" ()") +" => map:keys()","",empty());
454454
check(func.args(" { 'key': 1, 'value': 2 }") +" => map:keys()",1,root(Int.class));
455+
456+
query(func.args(" { 'key': 1, 'value': 2, 'more': 3 }"),"{1:2}");
455457
}
456458

457459
/** Test method. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp