Laravel QLDB Fetch data in plain text, how?

484 Views Asked by At

I have stored data into amazon QLDB using AWS console but I want to fetch this data into my application using aws-sdk-php-laravel. My code:

public function index(){
       $client = AWS::createClient('qldb-session');
       $result= $client->sendCommand([
         'StartSession' => [
           'LedgerName' => 'Vacine-issue'
         ]
       ]);
       $sessiontoken = ((object)$result->get('StartSession'))->SessionToken;
       $result = $client->sendCommand([
       'StartTransaction' =>
       [],
       'SessionToken' => $sessiontoken
       ]);
       $transectiontoken = ((object)$result->get('StartTransaction'))->TransactionId;
       $result = $client->sendCommand([
           'ExecuteStatement' => [
               'Statement' => 'SELECT * FROM Vaccination',
               'TransactionId' => $transectiontoken,
           ],
           'SessionToken' => $sessiontoken
       ]);
       dd($result);
   }

is showing the result in ION Binary encoding

enter image description here

is there any other way to get the result in simple text form ?

1

There are 1 best solutions below

1
On

At the moment, there is no PHP support for ION. You would have to either use another supported language, or parse the result by yourself.