Client Actions
Client actions allow you to work with the generated models directly. Client events wrap around these action methods. You can use the following way to manually access these methods.
❐ Copy
NOTE: depends on your configuration.
You can also access these action easier through a plugin like the following.
❐ Copy
batch()
Bulk insert or update records. This method is useful for importing functionality. It will use the upsert logic to determine if the record already exists. If it does, it will update the record. If it does not, it will insert the record.
❐ Copy
create()
Inserts a new record into the database.
❐ Copy
detail()
Retrieves a single record from the database given the primary key/s.
❐ Copy
get()
Retrieves the first record from the database given the column name and value.
❐ Copy
remove()
Removes a single record from the database given the primary key/s.
❐ Copy
restore()
Restores a single record from the database given the primary key/s (if the table is restorable).
❐ Copy
search()
Searches the database for records that match the given search parameters.
❐ Copy
The following describes the search parameters.
❐ Copy
update()
Updates a single record in the database given the primary key/s and the new values.
❐ Copy
upsert()
Inserts a new record into the database if it does not exist. If it does exist, it will update the record. It will use the existence of the primary key/s given to determine if the record exists.
❐ Copy