Whats about Fun.Tuple2 in MapDB3

253 views
Skip to first unread message

sheepy

unread,
May 3, 2016, 7:52:50 AM5/3/16
to MapDB
Hello,
In older MapDB Versions I used the Fun Tuple to build a key - value store where each key can refer to multiple values.

Is there also an option in MapDB3? i can't find the Fun.class anymore

best regards

Jan Kotek

unread,
May 4, 2016, 3:31:55 PM5/4/16
to ma...@googlegroups.com

Tuples were replaced with tuple arrays. There are examples in btree map:

 

http://www.mapdb/doc/btreemap/

--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Jan Kotek

unread,
May 4, 2016, 3:40:56 PM5/4/16
to ma...@googlegroups.com

sheepy

unread,
May 6, 2016, 2:27:40 AM5/6/16
to MapDB
thank you, sir!


Am Mittwoch, 4. Mai 2016 21:40:56 UTC+2 schrieb Jan Kotek:

Correct link:

http://www.mapdb.org/doc/btreemap/#composite-keys-and-tuples

 

 

On Wednesday, May 04, 2016 20:00:54 you wrote:

Tuples were replaced with tuple arrays. There are examples in btree map:

 

http://www.mapdb/doc/btreemap/

 

On Tuesday, May 03, 2016 04:52:50 sheepy wrote:

Hello,
In older MapDB Versions I used the Fun Tuple to build a key - value store where each key can refer to multiple values.

Is there also an option in MapDB3? i can't find the Fun.class anymore

best regards

--
You received this message because you are subscribed to the Google Groups "MapDB" group.

To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+unsubscribe@googlegroups.com.

sheepy

unread,
May 6, 2016, 5:22:48 AM5/6/16
to MapDB
Hello,
I've testet the Composite keys on a FileDB from your example:


        DB database = DBMaker.fileDB(filepath.make();   

        BTreeMap<Object[], Integer> map = database.treeMap("towns")
                .keySerializer(new SerializerArrayTuple(
                        Serializer.STRING, Serializer.STRING, Serializer.INTEGER))
                .valueSerializer(Serializer.INTEGER)
                .createOrOpen();
...
After reloading the database, I got the error:
Exception in thread "main" org.mapdb.DBException$NewMapDBFormat: Name Catalog has some new unsupported features: [towns#keySerializer: required parameter not found]
    at org.mapdb.DB.<init>(DB.kt:135)
    at org.mapdb.DB.<init>(DB.kt:37)
    at org.mapdb.DBMaker$Maker.make(DBMaker.kt:426)


is there any fix for it?

Jan Kotek

unread,
May 9, 2016, 1:47:50 AM5/9/16
to ma...@googlegroups.com

That is fixed in beta3

To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "MapDB" group.

To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages