Download the PHP package wowsql/wowsql-sdk without Composer
On this page you can find all versions of the php package wowsql/wowsql-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wowsql/wowsql-sdk
More information about wowsql/wowsql-sdk
Files in wowsql/wowsql-sdk
Package wowsql-sdk
Short Description Official PHP client library for WOWSQL - PostgreSQL Backend-as-a-Service with S3 Storage
License Elastic-2.0
Informations about the package wowsql-sdk
WowSQL PHP SDK
The official PHP SDK for WowSQL. Provides a clean, chainable interface for all PostgREST database operations, authentication, file storage, realtime, and schema management.
Table of Contents
- Requirements
- Installation
- Quick Start
- Client Configuration
- Database Operations
- get — Query Records
- getById — Fetch by Primary Key
- create / insert — Insert a Record
- bulkInsert — Insert Multiple Records
- upsert — Insert or Update
- update — Update by ID
- delete — Delete by ID
- Query Builder
- select — Choose Columns
- Filtering
- orderBy — Sort Results
- groupBy — Aggregate Groups
- limit / offset — Pagination
- paginate — Page-Based Pagination
- first — Single Record
- single — Exactly One Record
- count — Total Count
- sum / avg — Aggregates
- Authentication
- signUp
- signIn
- getUser
- OAuth — Google, GitHub, etc.
- forgotPassword / resetPassword
- sendOtp / verifyOtp
- sendMagicLink
- verifyEmail / resendVerification
- refreshToken
- changePassword / updateUser
- logout
- File Storage
- createBucket
- upload / uploadFromPath
- listFiles / download / deleteFile
- getPublicUrl
- Realtime
- Schema Management
- createTable
- addColumn / dropColumn / renameColumn
- dropTable / executeSql
- Error Handling
- Response Format
Requirements
- PHP 7.4 or higher
ext-curlenabled- Composer
textalk/websocket(optional; required for realtime —composer require textalk/websocket)
Installation
Quick Start
Client Configuration
project_url formats accepted:
| Format | Description |
|---|---|
"myproject" |
Appends .wowsqlconnect.com |
"myproject.wowsqlconnect.com" |
Full hostname |
"https://myproject.wowsqlconnect.com" |
Full URL |
"https://your-self-hosted-domain.com" |
Self-hosted instance |
API Key types:
| Key Prefix | Purpose |
|---|---|
wowsql_anon_... |
Public / client-side operations |
wowsql_service_... |
Privileged server-side operations (schema management, admin) |
Database Operations
get — Query Records
getById — Fetch by Primary Key
create / insert — Insert a Record
insert() is an alias for create().
bulkInsert — Insert Multiple Records
upsert — Insert or Update
update — Update by ID
delete — Delete by ID
Query Builder
All query builder methods return $this and are fully chainable. Call get() at the end to execute.
select — Choose Columns
Filtering
Available operators
| Method | PostgREST operator | Description |
|---|---|---|
eq($col, $val) |
eq |
Equals |
neq($col, $val) |
neq |
Not equals |
gt($col, $val) |
gt |
Greater than |
gte($col, $val) |
gte |
Greater than or equal |
lt($col, $val) |
lt |
Less than |
lte($col, $val) |
lte |
Less than or equal |
like($col, $pat) |
like |
SQL LIKE pattern |
ilike($col, $pat) |
ilike |
Case-insensitive LIKE |
isNull($col) |
is.null |
Column is NULL |
isNotNull($col) |
not.is.null |
Column is not NULL |
in($col, $arr) |
in.(...) |
Column in list |
notIn($col, $arr) |
not.in.(...) |
Column not in list |
between($col, $min, $max) |
gte+lte |
Inclusive range |
notBetween($col, $min, $max) |
lt+gt |
Outside range |
filter($col, $op, $val) |
any above | Generic filter |
orWhere($col, $op, $val) |
OR | OR condition |
orderBy — Sort Results
groupBy — Aggregate Groups
limit / offset — Pagination
paginate — Page-Based Pagination
first — Single Record
single — Exactly One Record
count — Total Count
sum / avg — Aggregates
Authentication
signUp
signIn
getUser
OAuth — Google, GitHub, etc.
Step 1: Get the authorization URL
Step 2: Exchange the callback code
forgotPassword / resetPassword
sendOtp / verifyOtp
Purposes: "login", "signup", "password_reset".
sendMagicLink
Purposes: "login", "signup", "email_verification".
verifyEmail / resendVerification
refreshToken
changePassword / updateUser
logout
File Storage
createBucket
upload / uploadFromPath
listFiles / download / deleteFile
getPublicUrl
Realtime
Subscribe to INSERT / UPDATE / DELETE, broadcast ephemeral events, and track presence. Uses the same anon or service_role key as REST.
The SDK connects to:
Enable a table first (POST /realtime/v1/enable with schema_name and table_name) before postgres changes. Channel send / presence do not need a Postgres trigger. Payloads are capped at 64 KiB. Missing key closes 4001; invalid key closes 4003 (do not reconnect). Multi-replica deployments need REDIS_URL.
Requires textalk/websocket. PHP uses a blocking listen() loop — run it in a worker process.
Schema Management
Schema operations require a service role key (wowsql_service_...).
createTable
addColumn / dropColumn / renameColumn
dropTable / executeSql
Error Handling
All SDK errors are instances of WOWSQL\WOWSQLException.
Storage-specific errors:
Schema-specific errors:
Response Format
All get() and query builder calls return a consistent array:
Single-record operations (create, update, delete, getById, upsert) return a plain associative array of the record.
Pagination (paginate) returns:
License
MIT License — see LICENSE for details.