This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
Releases: tmarois/Filebase
Releases · tmarois/Filebase
Version 1.0.14 (Read-Only Mode)
- Added #11 a new configuration variable
read_only
. By defaultfalse
, when set totrue
no modifications can be made to the database and if you attempt to make asave()
,delete()
,truncate()
orflush()
an exception will be thrown as those methods are not allowed to be used in read-only mode. - The database will not attempt to create a new directory if one does not exist during read-only mode, this can become an issue if you don't have permission to do so, read-only tries to solve that.
- When set to
false
the database functions as normal.
Version 1.0.13 (Safe File Name)
- Added #10 a new configuration variable
safe_filename
. By defaulttrue
, suppresses any file name errors and converts the file name to a valid name, if set tofalse
, an exception will be thrown upon a invalid name.
All users who update will notice no errors will appear upon an invalid name. Set safe_filename
to false
if you prefer the exception to be thrown.
Version 1.0.12 (Additional Query Methods)
- Added #8 -
select()
method on query class. Now allows you to specify which fields you want your documents to return. Note: usingselect
means your documents will not return document objects but only data arrays. This will allow you to only include the fields you want to use for your current task. (Excluding the rest and reducing memory usage). - Added
last()
method on query class to return the last item in the result array (opposite offirst()
) - Added
count()
method on query class to return the number of documents found by the query.
Version 1.0.11 (Query Sorting Patch for ASC)
- Fixed query
sort
which allows for "natural order", issues before would assume "1" and "10" are equal in value, but this has been resolved with this update. Uses phpstrnatcasecmp()
, This was fixed forDESC
order in the previous update. This patch fixes theASC
sort order for queryorderBy()
Version 1.0.10 (Query Sorting Patch)
- Fixed query
sort
which allows for "natural order", issues before would assume "1" and "10" are equal in value, but this has been resolved with this update. Uses phpstrnatcasecmp()
- Added argument
results( false )
-false
onresults()
method that allows it to return the full document object or (by default =true
) only the document data. - Added argument
first( false )
-false
onfirst()
method that allows it to return the full document object or (by default =true
) only the document data. - Minor additions to the documentation.
Version 1.0.9 (Feature Release)
- Fixed
customFilter
on #5 issue with array keys not properly resetting. - Improved speed of
filter()
since it was running the closure function twice. - Added alias of
customFilter()
asfilter()
method. (for shorter reference) - Added
version()
method on database class.$db->version()
for the Filebase version number.
Version 1.0.8 (Minor Update)
- Updated
customFilter
method to allow passable parameters intoclosure
function. (backward compatibility allowing param and function arguments to be any order)
Version 1.0.7 (Feature Release)
- Added
rollback()
method on the backup class. Now the ability to restore an existing back up (latest one available)
Version 1.0.6 (Feature Release)
- Added new
backup
class and functionality to create database backups. - Added
create()
,clean()
andfind()
methods on backup class.
Accessible when invoked on your database $db->backup->create()
, Rollbacks are on the to do list for the next update. This update includes the ability to create new backups and deletes or shows existing backups for your own records. Restoring from a previous backup is on the todo list.
Version 1.0.5 (Feature Release)
- Added new method database class
truncate()
as an alias offlush(true)
- Added
REGEX
as new query operator. Usespreg_match($regex, $fieldValue)