Skip to content

Commit

Permalink
1.27 2027-07-19
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecc-business-account committed Jul 19, 2024
1 parent bc5817c commit e72f12a
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 85 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ It also works as a small footprint database.
* [Concurrency test](#concurrency-test)
* [Usage](#usage)
* [Methods](#methods)
* [Constructor($baseFolder,$collection,$strategy=DocumentStoreOne::DSO_AUTO,$server="",$serializeStrategy = false,$keyEncryption = '')](#constructorbasefoldercollectionstrategydocumentstoreonedsoautoserverserializestrategy--falsekeyencryption--)
* [Constructor($baseFolder,$collection,$strategy=DocumentStoreOne::DSO_AUTO,$server="",$serializeStrategy = false,$keyEncryption = '')](#constructorbasefoldercollectionstrategydocumentstoreonedso_autoserverserializestrategy--falsekeyencryption--)
* [isCollection($collection)](#iscollectioncollection)
* [collection($collection)](#collectioncollection)
* [autoSerialize($value=true,$strategy='php')](#autoserializevaluetruestrategyphp-)
Expand All @@ -46,8 +46,8 @@ It also works as a small footprint database.
* [Strategy of Serialization](#strategy-of-serialization)
* [NONE](#none)
* [PHP](#php)
* [PHP_ARRAY](#phparray)
* [JSON_ARRAY and JSON_OBJECT](#jsonarray-and-jsonobject)
* [PHP_ARRAY](#php_array)
* [JSON_ARRAY and JSON_OBJECT](#json_array-and-json_object)
* [Control of Error](#control-of-error)
* [Working with CSV](#working-with-csv)
* [Version list](#version-list)
Expand Down Expand Up @@ -670,6 +670,8 @@ $doc->insert('csv1',$values);


# Version list
* 1.27 2027-07-19
* Fixed a problem with unlock (folder strategy), when the folder does not exist anymore.
* 1.26 2024-02-13
* composer.json ig-binary is suggested, not required
* 1.25.1 2023-06-04
Expand Down Expand Up @@ -708,7 +710,7 @@ $doc->insert('csv1',$values);
- 1.14 2020-09-13
* Fixed composer.json. However, the previous composer.json poisoned installations, so it removed all the previous
version from packagist.
* Maybe you should delete composer.lock and the folder vendor\efted\documentstoreone and runs composer update.
* Maybe you should delete "composer.lock" and the folder vendor\efted\documentstoreone and runs composer update.
> [RuntimeException]
> Could not load package eftec/documentstoreone in repo.packagist.org: [UnexpectedValueException] Could not parse version constraint ^5.6.*: Invalid version string "^5.6.*"
Expand Down
65 changes: 36 additions & 29 deletions examples/testsimple.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
<?php
use eftec\DocumentStoreOne\DocumentStoreOne;

include "../lib/DocumentStoreOne.php";
echo "test<br>";
try {
$flatcon = new DocumentStoreOne(__DIR__ . "/base", 'tmp','folder');

} catch (Exception $e) {
die("Unable to create document store");
}

$sid=uniqid();

$doc=array('sid'=>$sid);

$flatcon->insertOrUpdate('test',json_encode($doc));

$docRead=json_decode($flatcon->get('test'),true);
/*
if ($docRead['sid']!=$sid) {
throw new Exception("sid incorrect");
} else {
echo "ok";
}
*/
echo "ok";


<?php
use eftec\DocumentStoreOne\DocumentStoreOne;

include "../lib/DocumentStoreOne.php";
include "../lib/services/IDocumentStoreOneSrv.php";
include "../lib/services/DocumentStoreOneNone.php";
echo "test<br>";
try {
$flatcon = new DocumentStoreOne(__DIR__ . "/base", 'tmp','folder');

} catch (Exception $e) {
die("Unable to create document store");
}

$sid=uniqid();

$doc=array('sid'=>$sid);

$flatcon->insertOrUpdate('test',json_encode($doc));

$docRead=json_decode($flatcon->get('test'),true);
$t1=microtime(true);
$flatcon->appendValue('docapp',20);
$t2=microtime(true);
var_dump($t2-$t1);

/*
if ($docRead['sid']!=$sid) {
throw new Exception("sid incorrect");
} else {
echo "ok";
}
*/
echo "ok";


Loading

0 comments on commit e72f12a

Please sign in to comment.