Version : 3.00
A utility class to manipulate a simple List of Map to do basic CRUD.
Treat it as some kind of a NoSQL for key-value pairs.
It is suitable for small demo if you don't want to use SQL database.
Depends on:
This b4xlib replaces the class from MinimaList formerly published in B4J code snippet.
Code snippets also included for creating RESTful API subs for MinimaList Controller when developing with Web API Template 2.04+.
Properties
GitHub: https://github.com/pyhoon/MinimaListUtils-B4X
A utility class to manipulate a simple List of Map to do basic CRUD.
Treat it as some kind of a NoSQL for key-value pairs.
It is suitable for small demo if you don't want to use SQL database.
Depends on:
- RandomAccessFile
This b4xlib replaces the class from MinimaList formerly published in B4J code snippet.
Code snippets also included for creating RESTful API subs for MinimaList Controller when developing with Web API Template 2.04+.
Properties
- First As Map (read)
- Last As Map (read)
- List As List (read/write)
- CaseSensitive As Boolean (read/write)
- Add (M As Map)
- Clone As MinimaList
- ContainsKey (key As String) As Boolean
- CopyList As Object
- CopyObject (O As Object) As Object
- CountById (key As String, id As Long) As Int
- CreateFromList (L As List) As MinimaList
- CreateType (id As Int, value As Object) As mType
- Exclude (id As Long) As List
- ExcludeAll (keys As List, values As List) As List
- ExcludeAny (keys As List, values As List) As List
- Find (id As Long) As Map
- FindAll (keys As List, values As List) As List
- FindAnyLike (keys As List, values As List) As List
- FindByKey (key As String, value As Object)
- FindFirst (keys As List, values As List) As Map
- IndexFromId (id As Long) As Long
- IndexFromMap (M As Map) As Long
- Limit (Number As Int) As MinimaList
- Merge (ML As MinimaList, key1 As String, key2 As String) As MinimaList
- Remove (index As Long)
- Remove2 (M As Map)
- RemoveKey (key As String, index As Long)
- RemoveKey2 (key As String, M As Map)
- ResetFirstAndLast
- Reverse As MinimaList
- SortByKey (key As String, ascending As Boolean)
- SortByKey2 (key As String, ascending As Boolean, default As Object)
- Version 3.00
- Added Merge sub
- Added CaseSensitive property
- Added CreateFromList sub (Private)
- Added ResetFirstAndLast sub (Private)
- First property is now read only
- Last property is now read only
- Updated List property (write)
- Updated Add sub
- Updated Clone sub
- Replaced Count with CountById and updated
- Updated Remove sub
- Updated Remove2 sub
- Updated RemoveKey sub
- Updated IndexFromMap sub
- Updated IndexFromId sub
- Updated Find sub
- Updated FindByKey sub
- Updated FindFirst sub
- Updated FindAll sub
- Updated FindAnyLike sub
- Updated Exclude sub
- Updated ExcludeAll sub
- Updated ExcludeAny sub
- Updated Reverse sub
- Updated Limit sub
- Updated ContainsKey sub
- Updated SortByKey sub
- Updated SortByKey2 sub
- Updated CreateType sub
- Added Macros for building B4X library
- Added CustomBuildAction
- Version 2.00
- Update Clone method
- Add #Macro tags
- Version 1.80
- Added ContainsKey
- Renamed CreatemType to CreateType
- Version 1.07
- Added Limit
- Replace dependency of KeyValueStore to RandomAccessFile
- Version 1.06
- Added Clone
- Update Reverse return the resulted object
- Update SortByKey
- Added SortByKey2
- First and Last properties are now writable
- Version 1.05
- Fix bug in SortByKey
- Added CopyObject
- Update CopyList
- Version 1.04
- Added Reverse, FindByKey, SortByKey
- Updated Snippet 08
- Version 1.03
- Update Snippets, removed #plural tag
- Version 1.02
- Added CopyList sub
- Version 1.01
- Add KeyValueStore dependency to manifest file
GitHub: https://github.com/pyhoon/MinimaListUtils-B4X
Attachments
Last edited: