Skip to content

Commit

Permalink
feat: adding methods documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
HilarioX committed Mar 13, 2024
1 parent 1b08c72 commit 3719620
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/AwsDynamoDbKeyValue.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ $iterator = $dynamodb->getIterator($options);
print_r($iterator->toArray());
```

### Check if a key exists

```php
<?php
$dynamodb = \ByJG\AnyDataset\NoSql\Factory::getInstance('dynamodb://....');
if ($dynamodb->has(1201)) {
echo "exist!";
}
```

## Further reading

- [https://docs.aws.amazon.com/aws-sdk-php/v2/guide/service-dynamodb.html](https://docs.aws.amazon.com/aws-sdk-php/v2/guide/service-dynamodb.html)
Expand Down
17 changes: 17 additions & 0 deletions docs/AwsS3KeyValue.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,22 @@ while (strlen($data) <= $size) {
}
```

## Rename a key

```php
<?php
$s3 = \ByJG\AnyDataset\NoSql\Factory::getInstance('s3://....');
$s3->rename("object_name", "new_object_name");
```

## Check if a key exists

```php
<?php
$s3 = \ByJG\AnyDataset\NoSql\Factory::getInstance('s3://....');
if ($s3->has("object_name")) {
echo "exist!";
}
```
----
[Open source ByJG](http://opensource.byjg.com)

0 comments on commit 3719620

Please sign in to comment.