B4J Library PocketBase - RawUpdate (A route/handler to execute UPDATE SQL Commands)

Hi Fam

Background

RawUpdate is a new addition to the pocketbase routes. Its purpose is to help anyone execute UPDATE SQL Commands directly to their pocketbase back-end.

1755576558326.png


You need to drop the file to your pb_hooks directly and you are able to execute the update commands

Here you pass the collection you want..

B4X:
 http://127.0.0.1:1001/api/rawupdate/bma_course

Then pass the body of the record to update. The filter works like your where clause.

B4X:
{
    "record": {
        "name": "Anele Testing Insert4",
        "manager": "123456fxxx",
        "active": "false"
    },
    "filter": "id='n1234567898'",
    "fields": "id,name,active"
}

Output

B4X:
{
    "record": {
        "id": "n1234567898",
        "name": "Anele Testing Insert4",
        "active": "false"
    },
    "success": true
}
 

Attachments

  • rawupdate.pb.js.zip
    2 KB · Views: 19
Top