Download the PHP package phattarachai/laravel-sap-proxy without Composer

On this page you can find all versions of the php package phattarachai/laravel-sap-proxy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sap-proxy

Laravel SAP Proxy

Latest Version on Packagist Tests Code Style PHP Version Laravel Version Total Downloads

A Laravel database driver that runs SAP HANA queries through a small HTTP SQL proxy instead of a local ODBC driver. Your app keeps using Eloquent and the query builder; every statement is sent as one HTTP request to a proxy that holds the HANA connection.

It is built for hosts where installing the HANA ODBC client in every PHP app is impractical, and it handles what a proxy in the middle adds:

Installation

The service provider is auto-discovered and registers the proxy database driver.

Configuration

Add a connection to config/database.php:

Key Default Meaning
proxy_url — (required) The proxy's query endpoint.
database / proxy_connection sap Which connection the proxy should run the SQL on.
timeout 120 Seconds per attempt. proxy_timeout is read as a fallback.
retry [500, 2000, 5000] Milliseconds to wait before each retry. The default makes up to 4 attempts over about 7.5s.
encode_sql true Send sql_b64 instead of sql.

Then query it like any other connection:

selectWithLimit() asks the proxy to cap the rows before it serializes them, which is useful for interactive query editors:

The proxy protocol

The driver POSTs JSON and expects JSON back:

A Node.js proxy that speaks this protocol over the hdb client is about 150 lines of code. Give it a SIGTERM handler that drains in-flight requests, so a restart does not cut off queries that are still running.

Exceptions

Exception When Notes
Phattarachai\SapProxy\Exceptions\SapQueryException The proxy answered 422 The message is the database's error text, safe to show to whoever wrote the SQL. ->sql holds the statement.
Phattarachai\SapProxy\Exceptions\SapProxyException Unreachable, timed out, or a non-422 failure after every retry The previous exception is the underlying ConnectionException / RequestException. ->sql and context() hold the statement that was running.

The connection is read-only by nature: it has no PDO, so transactions and cursor() throw a LogicException.

Testing

License

MIT. See LICENSE.md.


All versions of laravel-sap-proxy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
guzzlehttp/guzzle Version ^7.0
illuminate/database Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phattarachai/laravel-sap-proxy contains the following files

Loading the files please wait ...