8000 GitHub - pyhoon/MinimaListUtils-B4X: A utility class to manipulate a simple List of Map to do basic CRUD.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pyhoon/MinimaListUtils-B4X

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MinimaListUtils-B4X

Version: 1.07
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.

It depends on RandomAccessFile library.
Note: You can use File.WriteBytes and File.ReadBytes to write to and read from a file.

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/write)
  • Last As Map (read/write)
  • List (read/write)

Methods

  • Add (M As Map)
  • Clone As MinimaList
  • CopyList As Object
  • CopyObject (xo As Object) As Object
  • Count (key As String, id As Long) As Int
  • 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
  • Remove (index As Long)
  • Remove2 (M As Map)
  • RemoveKey (key As String, index As Long)
  • RemoveKey2 (key As String, M As Map)
  • Reverse As MinimaList
  • SortByKey (key As String, ascending As Boolean)
  • SortByKey2 (key As String, ascending As Boolean, default As Object)

What's New

  • 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
0