Persistence Layer

Elastic PostgreSQL

Every Afribase project includes a full, dedicated PostgreSQL instance. We combine the reliability of relational data with the speed of **zero-code API generation** via PostgREST, allowing both developers and no-code creators to build robust backends instantly.

Management Interface

Advanced SQL Workbench

A robust environment for schema design and complex data manipulation. Our SQL Workbench features intelligent autocomplete, query snippets, and a complete execution history to streamline your database development.

IntelliSensePostgres 15+Query Profiling

Visual Schema Explorer

Manage your tables, relationships, and raw data via a high-fidelity visual interface. Afribase eliminates the need for external database managers by providing a seamless, spreadsheet-like experience for rapid prototyping.

Advanced Scaling

Afribase databases are hosted on high-performance infrastructure, ensuring your project remains fast and responsive at any scale.

Automatic Backups

Daily backups and point-in-time recovery (PITR) to protect your infrastructure against data loss.

Connection Pooling

Integrated PgBouncer allows you to handle thousands of simultaneous connections without performance degradation.

Row Level Security (RLS)

The cornerstone of Afribase infrastructure is database-level security. Row Level Security allows you to define policies that restrict access to data based on user identity.

sql
-- Enable RLS for a specific table
ALTER TABLE profiles ENABLE ROW LEVEL SECURITY;

-- Create a policy for users to see only their own row
CREATE POLICY "Users can see only their own profile"
  ON profiles FOR SELECT
  USING (auth.uid() = id);
Always enable RLS for production project tables. Without RLS, your data may be exposed to the public internet via the Data API.

Application Integration

Query your database from any supported platform using our official client libraries. Note that Python uses from_() to avoid keyword conflicts.

JavaScript / TypeScript

typescript
const { data, error } = await afribase
  .from('posts')
  .select('*')
  .eq('published', true)
  .order('created_at', { ascending: false });

Python

python
data = client.from_("posts").select("*").eq("published", True).order("created_at", desc=True).execute()

Dart / Flutter

dart
final response = await client.from('posts').select('*').eq('published', true).order('created_at', ascending: false).execute();

Database Functions (RPC)

Execute custom PostgreSQL stored procedures directly from your application logic. This allows you to offload intensive computation to the database layer.

JavaScript

typescript
const { data, error } = await afribase.rpc('get_top_users', { limit_count: 10 });

Python

python
result = client.rpc("get_top_users", {"limit_count": 10}).execute()

Dart

dart
final result = await client.rpc('get_top_users', {'limit_count': 10}).execute();

© 2026 Afribase Cloud Infrastructure. Produced by Altris Product Systems.