Migration from v0.x
import { Aside } from ‘@astrojs/starlight/components’;
PocketbaseExtended v1.0 is a superset of the old PocketbaseArduino library. Existing sketches compile without changes — but there are several fixes and new capabilities worth adopting.
Breaking changes
Section titled “Breaking changes”There are no breaking changes. All v0.x method names still work.
What changed
Section titled “What changed”| v0.x | v1.0 |
|---|---|
PocketbaseArduino pb(...) | PocketbaseExtended pb(...) — PocketbaseArduino still compiles as a typedef alias |
#include <BearSSLHelpers.h> in sketch | No longer needed — included internally |
#include <ESP8266HTTPClient.h> in sketch | No longer needed — included internally |
getList wrote skipTotal=<filter> instead of filter=<filter> (bug) | Fixed — all query params map correctly |
No update() | update() / updateEx() added |
| No authentication | authWithPassword(), authRefresh(), setAuthToken(), clearAuthToken() added |
| All errors returned empty string | PBResponse struct with ok, statusCode, body, and error |
| Debug logging always on | Off by default; enable with pb.setDebug(true) |
Adopting PBResponse
Section titled “Adopting PBResponse”The biggest improvement is structured error handling. Where v0.x returned an empty string on failure:
// v0.x — no way to tell success from failureString body = pb.collection("notes").getList("1", "10");if (body == "") { // error? or just an empty list?}v1.0 has Ex variants that return a PBResponse:
// v1.0 — explicit, unambiguousPBResponse resp = pb.collection("notes").getListEx("1", "10");if (resp.ok) { Serial.println(resp.body);} else { Serial.println("HTTP " + String(resp.statusCode) + ": " + resp.error);}The original getList, getOne, create, update, and deleteRecord methods are still present and return String, so migration can be done incrementally.
Removing manual includes
Section titled “Removing manual includes”If your sketch includes these lines, they can be removed:
// These are now handled inside the library — safe to delete from your sketch#include <BearSSLHelpers.h>#include <ESP8266HTTPClient.h>Keep only the platform WiFi include and PocketbaseExtended.h:
#include <PocketbaseExtended.h>#include <ESP8266WiFi.h> // or <WiFi.h> for ESP32