CrossClj

0.1.1 docs

SourceDocs



RECENT
    VARS
    ->FileMap
    fm-assoc!
    fm-contains?
    fm-del!
    fm-dissoc!
    fm-get
    fm-ids
    fm-keys
    fm-new!
    fm-vals
    index
    process-line
    rd
    wr

    « Index of all namespaces of this project

    Functions for handling data bases stored in text files as maps.
    In every file lines with the character '=' are considered pairs of key-value.
    Also:
      * Lines without '=' are discarded.
      * If there are more than one '=' in a line, the first one will be the
        separator.
      * Keys and values are trimmed.  
    (->FileMap f map)
    Positional factory function for class dmclj.filemap.FileMap.
    
    (fm-assoc! id key value)
    symbol -> symbol -> String -> ()
    
    Changes the value of key in the FileMap associate with [id]
    
    (fm-contains? id key)
    symbol -> symbol -> Boolean
    
    Returns true if the FileMap associated with [id] contains [key]
    
    (fm-del! id)
    symbol -> ()
    
    Deletes the FileMap associate with [id]
    
    (fm-dissoc! id key)
    symbol -> symbol -> ()
    
    Removes key in the FileMap associate with [id]
    
    (fm-get id key)
    symbol -> symbol -> Object
    
    Returns the value of [key] from the FileMap associated with [id]
    
    (fm-ids)
    () -> seq
    
    Returns a seq with ids of different FileMaps stored in the data base.
    
    (fm-keys id)
    symbol -> seq
    
    Returns a sequence of keys of the FileMap associated with [id]
    
    (fm-new! id file)(fm-new! id file default)
    symbol -> file -> ()
    symbol -> file -> map -> ()
    
    Creates a new internal object named 'FileMap' which is associated with [id]
      [id] Identifier of FileMap.
      [file] File to save data. If does not exist, is created.
      [default] 'map' with initial key-values.
    (fm-new! id file) is equals to (fm-new! id file {})
    
    (fm-vals id)
    symbol -> seq
    
    Returns a sequence of values of the FileMap associated with [id]
    
    Private
    (process-line mp line)
    Private
    (rd f default)
    Private
    (wr f mp)