-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc5817c
commit e72f12a
Showing
3 changed files
with
160 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
|
||
|
Oops, something went wrong.