Idiomatic PHP client for Cloud Datastore.

Overview

Google Cloud PHP Datastore

Idiomatic PHP client for Cloud Datastore.

Latest Stable Version Packagist

NOTE: This repository is part of Google Cloud PHP. Any support requests, bug reports, or development contributions should be directed to that project.

A NoSQL document database built for automatic scaling, high performance, and ease of application development. While the Cloud Datastore interface has many of the same features as traditional databases, as a NoSQL database it differs from them in the way it describes relationships between data objects.

Installation

To begin, install the preferred dependency manager for PHP, Composer.

Now to install just this component:

$ composer require google/cloud-datastore

Or to install the entire suite of components at once:

$ composer require google/cloud

Authentication

Please see our Authentication guide for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.

Sample

require 'vendor/autoload.php';

use Google\Cloud\Datastore\DatastoreClient;

$datastore = new DatastoreClient();

// Create an entity
$bob = $datastore->entity('Person');
$bob['firstName'] = 'Bob';
$bob['email'] = '[email protected]';
$datastore->insert($bob);

// Update the entity
$bob['email'] = '[email protected]';
$datastore->update($bob);

// If you know the ID of the entity, you can look it up
$key = $datastore->key('Person', '12345328897844');
$entity = $datastore->lookup($key);

Version

This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.

Compatibility with Google App Engine

This component is compatible with PHP projects on Google App Engine in the Standard or Flexible environments. To maximize the performance of datastore operations in your app, we recommend the following configuration:

  1. PHP 7 runtime
  2. Enable grpc.so and protobuf.so in your php.ini file
  3. Set your DatastoreClient object's 'transport' option to 'grpc'

You are likely to experience less optimal datastore performance using the PHP 5 runtime on App Engine standard due to the lack of the protobuf extension.

Next Steps

  1. Understand the official documentation.
  2. Take a look at in-depth usage samples.
You might also like...
php 8 client for the lemon.markets api

lemon.markets php client This repository contains a php 8+ compatible client for the https://lemon.markets API. The documentation of the API can be fo

PHP client for Microsoft Azure Face API.

Microsoft Azure Face API PHP client A PHP library that utilizes Azure Face REST API. Requirements PHP = 7.4 Installation composer require darmen/php-

Google PHP API Client Services

Google PHP API Client Services

AltiriaSmsPhpClient, the official PHP client of Altiria
AltiriaSmsPhpClient, the official PHP client of Altiria

Altiria, cliente SMS PHP Altiria SMS PHP es un cliente que simplifica al máximo la integración de nuestro API para PHP. Por el momento, esta librería

PHP Client for the GoFlink API

GoFlink PHP API Client This project is an unofficial library to communicate with the GoFlink API from your PHP project. Documentation about the API is

A PHP client for the official Kizeo Forms API V3+. 📌

Kizeo Forms API V3+ - PHP This is a Swagger generated doc for Kizeo REST API 3. You can find additionnal documentation here : Online documentation. Th

Client for the Tenant Security Proxy in PHP

Tenant Security Client PHP Library A PHP client for implementing CMK within a vendor's infrastructure. Makes requests through an IronCore Tenant Secur

Shopee Open API v2 Client build with php

Shopee PHP Client This is a Shopee PHP Client, currently supported for API V2 in ShopeeOpenPlatform Composer Install composer require haistar/shopee-p

The official Previewify.app PHP Client
The official Previewify.app PHP Client

Previewify for PHP This is the official Previewify client for PHP. Support us Like our work? You can support us by purchasing one of our products. Ins

Comments
  • Configure Renovate

    Configure Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    :vertical_traffic_light: To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • composer.json (composer)

    Configuration Summary

    Based on the default config's presets, Renovate will:

    • Start dependency updates only once this Configure Renovate PR is merged
    • Separate major versions of dependencies into individual branches/PRs
    • Do not separate patch and minor upgrades into separate PRs for the same dependency
    • Upgrade to unstable versions only if the existing version is unstable
    • Raise PRs immediately (after branch is created)
    • Use renovate/ as prefix for all branch names
    • If semantic commits detected, use semantic commit type fix for dependencies and chore for all others
    • Keep existing branches updated even when not scheduled
    • Disable automerging feature - wait for humans to merge all PRs
    • Ignore node_modules, bower_components, vendor and various test/tests directories
    • Update existing lock files only when package.json is modified
    • Autodetect whether to pin dependencies or maintain ranges
    • Rate limit PR creation to a maximum of two per hour
    • Limit to maximum 20 open PRs at any time
    • Group known monorepo packages together
    • Use curated list of recommended non-monorepo package groupings

    :abcd: Would you like to change the way Renovate is upgrading your dependencies? Simply edit the renovate.json in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs.


    What to Expect

    With your current configuration, Renovate will create 2 Pull Requests:

    Pin dependencies
    Update dependency squizlabs/php_codesniffer to v3

    :question: Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by Renovate Bot. View repository job log here.

    cla: yes 
    opened by renovate-bot 1
  • feat: expose new read_time API fields, currently only available in private preview

    feat: expose new read_time API fields, currently only available in private preview

    • [ ] Regenerate this pull request now.

    PiperOrigin-RevId: 440914241

    Source-Link: https://github.com/googleapis/googleapis/commit/0ed730f27474890a727a72bdc85e6d20715e2f87

    Source-Link: https://github.com/googleapis/googleapis-gen/commit/b2e5ae97fd24f64af0fef1999dad14945fdc3663 Copy-Tag: eyJwIjoiLk93bEJvdC55YW1sIiwiaCI6ImIyZTVhZTk3ZmQyNGY2NGFmMGZlZjE5OTlkYWQxNDk0NWZkYzM2NjMifQ==

    feat: [Datastore] add IN/NOT_IN/NOT_EQUALS support to cloud datastore proto PiperOrigin-RevId: 434824722

    Source-Link: https://github.com/googleapis/googleapis/commit/4bfdcd371b9fac734d4b2ee8d8beae4f9f5e1aba

    Source-Link: https://github.com/googleapis/googleapis-gen/commit/5982b9b085388d6c9a90a5578ebe47518fe0932e Copy-Tag: eyJwIjoiLk93bEJvdC55YW1sIiwiaCI6IjU5ODJiOWIwODUzODhkNmM5YTkwYTU1NzhlYmU0NzUxOGZlMDkzMmUifQ==

    kokoro:force-run api: datastore owl-bot-copy 
    opened by gcf-owl-bot[bot] 0
  • chore(bazel): [Datastore] update gapic-generator-php to v1.4.0

    chore(bazel): [Datastore] update gapic-generator-php to v1.4.0

    • [ ] Regenerate this pull request now.

    Changes include:

    • manually fix field_behavior breaking changes
    • support google.api.routing header injection

    PiperOrigin-RevId: 423367804

    Source-Link: https://github.com/googleapis/googleapis/commit/f4bd29f87b262bb8d8d10ff6a140675eeadb0404

    Source-Link: https://github.com/googleapis/googleapis-gen/commit/350d16c65e8c892c920b2329c77d2233243623ce Copy-Tag: eyJwIjoiLk93bEJvdC55YW1sIiwiaCI6IjM1MGQxNmM2NWU4Yzg5MmM5MjBiMjMyOWM3N2QyMjMzMjQzNjIzY2UifQ==

    kokoro:force-run api: datastore owl-bot-copy 
    opened by gcf-owl-bot[bot] 0
Releases(v1.17.1)
Owner
Google APIs
Clients for Google APIs and tools that help produce them.
Google APIs
Google-api-php-client - A PHP client library for accessing Google APIs

Google APIs Client Library for PHP Reference Docs https://googleapis.github.io/google-api-php-client/main/ License Apache 2.0 The Google API Client Li

Google APIs 8.4k Dec 30, 2022
PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

Sergey Bykov 63 Feb 14, 2022
OpenAI API Client is a component-oriented, extensible client library for the OpenAI API. It's designed to be faster and more memory efficient than traditional PHP libraries.

OpenAI API Client in PHP (community-maintained) This library is a component-oriented, extensible client library for the OpenAI API. It's designed to b

Mounir R'Quiba 6 Jun 14, 2023
Fatture in Cloud SDK (Software Development Kit) for PHP

FattureInCloud PHP SDK Request informations In every request description you will be able to find some additional informations about context, permissi

Fatture in Cloud 25 Dec 5, 2022
Google Cloud Profiler for PHP

Google Cloud Profiler for PHP Idiomatic PHP client for Google Cloud Profiler. API documentation NOTE: This repository is part of Google Cloud PHP. Any

Google APIs 1 Apr 28, 2022
⚡️ Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC.

Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC. This project is a work-in-progress. Code and docume

Web3 PHP 665 Dec 23, 2022
A simple PHP GitHub API client, Object Oriented, tested and documented.

PHP GitHub API A simple Object Oriented wrapper for GitHub API, written with PHP. Uses GitHub API v3 & supports GitHub API v4. The object API (v3) is

KNP Labs 2k Jan 7, 2023
A simple Object Oriented PHP Client for Termii SMS API

Termii Client A simple Object Oriented PHP Client for Termii SMS API. Uses Termii API. Requirements PHP >= 7.2 Guzzlehttp ~6|~7 Installation Via Compo

Ilesanmi Olawale Adedotun 5 Feb 24, 2022
Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services

Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services

Xendit 96 Jan 6, 2023
PHP client for Kafka

A library to allow people to communicate to Kafka using plain PHP, compatible with Kafka v0.11+ (due to the way the protocol works).

Luís Cobucci 52 Dec 23, 2022