Module
dbclient
Module dbclient
API
tharmigan/dbclient
0.1.0
Hospital MySQL DB client
This package provides a MySQL client for the hospital database.
Clients
dbclient: Client
Isolated
queryNativeSQL
Isolated FunctionRemote Function
function queryNativeSQL(ParameterizedQuery sqlQuery, typedesc<record {}> rowType) returns stream<rowType, Error?>
executeNativeSQL
Isolated FunctionRemote Function
function executeNativeSQL(ParameterizedQuery sqlQuery) returns ExecutionResult|Error
Parameters
- sqlQuery ParameterizedQuery -
get appointments
Isolated FunctionResource Function
function get appointments(AppointmentTargetType targetType, ParameterizedQuery whereClause, ParameterizedQuery orderByClause, ParameterizedQuery limitClause, ParameterizedQuery groupByClause) returns stream<targetType, Error?>
Parameters
- targetType AppointmentTargetType (default <>) -
- whereClause ParameterizedQuery (default ``) -
- orderByClause ParameterizedQuery (default ``) -
- limitClause ParameterizedQuery (default ``) -
- groupByClause ParameterizedQuery (default ``) -
get appointments/[int appointmentId]
Isolated FunctionResource Function
function get appointments/[int appointmentId](AppointmentTargetType targetType) returns targetType|Error
Parameters
- targetType AppointmentTargetType (default <>) -
post appointments
Isolated FunctionResource Function
function post appointments(AppointmentInsert[] data) returns int[]|Error
Parameters
- data AppointmentInsert[] -
put appointments/[int appointmentId]
Isolated FunctionResource Function
function put appointments/[int appointmentId](AppointmentUpdate value) returns Appointment|Error
Parameters
- value AppointmentUpdate -
delete appointments/[int appointmentId]
Isolated FunctionResource Function
function delete appointments/[int appointmentId]() returns Appointment|Error
get patients
Isolated FunctionResource Function
function get patients(PatientTargetType targetType, ParameterizedQuery whereClause, ParameterizedQuery orderByClause, ParameterizedQuery limitClause, ParameterizedQuery groupByClause) returns stream<targetType, Error?>
Parameters
- targetType PatientTargetType (default <>) -
- whereClause ParameterizedQuery (default ``) -
- orderByClause ParameterizedQuery (default ``) -
- limitClause ParameterizedQuery (default ``) -
- groupByClause ParameterizedQuery (default ``) -
get patients/[int id]
Isolated FunctionResource Function
function get patients/[int id](PatientTargetType targetType) returns targetType|Error
Parameters
- targetType PatientTargetType (default <>) -
post patients
Isolated FunctionResource Function
function post patients(PatientInsert[] data) returns int[]|Error
Parameters
- data PatientInsert[] -
put patients/[int id]
Isolated FunctionResource Function
function put patients/[int id](PatientUpdate value) returns Patient|Error
Parameters
- value PatientUpdate -
delete patients/[int id]
Isolated FunctionResource Function
close
Isolated Function
function close() returns Error?
Configurables
Records
dbclient: Appointment
Closed record
Fields
- appointmentIdreadonly int -
- patientId int -
- doctor string -
- date string -
dbclient: AppointmentInsert
Closed record
Fields
- patientId int -
- doctor string -
- date string -
dbclient: AppointmentOptionalized
Closed record
Fields
- appointmentId? int -
- patientId? int -
- doctor? string -
- date? string -
dbclient: AppointmentUpdate
Closed record
Fields
- patientId? int -
- doctor? string -
- date? string -
dbclient: Patient
Closed record
Fields
- idreadonly int -
- name string -
- age int -
- condition string -
dbclient: PatientInsert
Closed record
Fields
- name string -
- age int -
- condition string -
dbclient: PatientOptionalized
Closed record
Fields
- id? int -
- name? string -
- age? int -
- condition? string -
dbclient: PatientUpdate
Closed record
Fields
- name? string -
- age? int -
- condition? string -
Type descriptor types
dbclient: AppointmentTargetType
AppointmentTargetType
dbclient: PatientTargetType
PatientTargetType
Import
import tharmigan/dbclient;
Metadata
Released date: about 2 months ago
Version: 0.1.0
Compatibility
Platform: java21
Ballerina version: 2201.11.0
Pull count
Total: 2
Current verison: 2
Weekly downloads
Other versions
0.1.0