-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from griddb/php8
PHP8
- Loading branch information
Showing
39 changed files
with
364 additions
and
172 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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
if (file_exists('griddb_php_client.php')) { | ||
// File php wrapper is generated with SWIG 4.0.2 and below | ||
include_once('griddb_php_client.php'); | ||
} | ||
|
||
$factory = StoreFactory::getInstance(); | ||
|
||
$containerName = "SamplePHP_PutRows"; | ||
$rowCount = 5; | ||
$rowArray = []; | ||
|
||
try { | ||
// Get GridStore object | ||
$gridstore = $factory->getStore(["host" => $argv[1], | ||
"port" => (int)$argv[2], | ||
"clusterName" => $argv[3], | ||
"username" => $argv[4], | ||
"password" => $argv[5]]); | ||
|
||
// Create a collection | ||
$conInfo = new ContainerInfo(["name" => $containerName, | ||
"columnInfoArray" => [["id", Type::INTEGER], | ||
["productName", Type::STRING], | ||
["count", Type::INTEGER]], | ||
"type" => ContainerType::COLLECTION, | ||
"rowKey" => true]); | ||
|
||
$col = $gridstore->putContainer($conInfo); | ||
echo("Create Collection name=$containerName\n"); | ||
|
||
// Register multiple rows | ||
// (1)Get the container | ||
$col1 = $gridstore->getContainer($containerName); | ||
if ($col1 == null) { | ||
echo("ERROR Container not found. name=$containerName\n"); | ||
} | ||
|
||
// Register multiple rows | ||
for ($i = 0; $i < $rowCount; $i++) { | ||
$row = []; | ||
array_push($row, $i, "dvd", 10*$i); | ||
array_push($rowArray, $row); | ||
} | ||
$col1->multiPut($rowArray); | ||
|
||
echo("Put rows\n"); | ||
echo("success!\n"); | ||
} catch (GSException $e) { | ||
for ($i= 0; $i < $e->getErrorStackSize(); $i++) { | ||
echo("\n[$i]\n"); | ||
echo($e->getErrorCode($i)."\n"); | ||
echo($e->getLocation($i)."\n"); | ||
echo($e->getErrorMessage($i)."\n"); | ||
} | ||
} | ||
?> |
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
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
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
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
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
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
Oops, something went wrong.