# README
mcdbcrud | github.com/abbeymart/mcdbcrud
- CRUD operations package for RDBMS in Go - PostgreSQL [and MySQL and SQLite - work-in-progress]
- See the test files for different test cases / scenarios and usage
# Functions
ArrayIntContains check if a slice of int contains/includes an int value.
ArrayMapToMapUnderscore converts []map-fields to underscore.
ArrayMapToStruct converts []map/actParams to []struct/model-type.
ArrayStringContains check if a slice of string contains/includes a string value.
ArrayToSQLStringValues transforms a slice of string to SQL-string-formatted-values.
CheckTaskType function determines and returns the taskType, based on the actionParams from the CrudParamsType.
CheckTaskTypeV1 determine/set task type based on the actionParams.
ComputeAccessResValue returns the transform access-response-value of AccessResValueType.
ComputeCreateQuery function computes insert SQL scripts.
ComputeDeleteQueryById function computes delete SQL scripts by id(s).
ComputeDeleteQueryByIds function computes delete SQL scripts by id(s).
ComputeDeleteQueryByParam function computes delete SQL scripts by parameter specifications.
ComputeSelectQueryAll compose select SQL script to retrieve all table-records.
ComputeSelectQueryById compose select SQL scripts by id.
ComputeSelectQueryByIds compose select SQL scripts by ids.
ComputeSelectQueryByParam compose SELECT query from the where-parameters.
ComputeTaskDuration computes the task interval in microseconds.
ComputeUpdateQuery function computes update SQL script.
ComputeUpdateQueryById function computes update SQL scripts by recordId.
ComputeUpdateQueryByIds function computes update SQL scripts by recordIds.
ComputeUpdateQueryByParam function computes update SQL scripts by queryParams.
ComputeWhereQuery function computes the multi-cases where-conditions for crud-operations.
No description provided by the author
ConvertJsonBase64StringToMap converts the db-json-string-value to the map-type.
ConvertJsonBase64StringToTypeValue converts the db-json-string-value to the base-type.
ConvertJsonStringToMapValue converts the db-json-string-value to the map-type.
ConvertJsonStringToTypeValue converts the db-json-string-value to the base-type.
No description provided by the author
No description provided by the author
DataToValueParam accepts only a struct type/model and returns the ActionParamType data camel/Pascal-case keys are converted to underscore-keys to match table-field/columns specs.
EmailUsername processes and returns the loginName as email or username.
No description provided by the author
No description provided by the author
ExcludeFieldFromMapRecord exclude id and accessKey fields.
GetParamsMessage compose the message-object into mcresponse.ResponseMessage.
JsonToStruct converts json inputs to equivalent struct data type specification rec must be a pointer to a type matching the jsonRec.
MapToMapCamelCase converts map underscore-fields to camelCase-fields.
MapToMapUnderscore converts map camelCase-fields to underscore-fields.
MapToStruct converts map to struct.
No description provided by the author
No description provided by the author
NewCrud constructor returns a new crud-instance.
ParseRawValues process the raw rows/records from SQL-query.
QueryFields function computes the underscore field-names from the specified model.
RandomNumbers generates random numbers using rand.Perm and returns []int as string.
RandomString generates random string of characters and numbers.
StructToFieldValues converts struct to record fields(underscore) and associated values (columns and values).
StructToMap function converts struct to map.
No description provided by the author
StructToMapUnderscore converts struct to map (underscore_fields), for crud-db-table-record.
StructToTagMap function converts struct to map (tag/underscore_field), for crud-db-table-record.
TagField return the field-tag (e.g.
No description provided by the author
TransformGetCrudParams compose the crud-params for read-query.
No description provided by the author
ValidateSubActionParams validates that subscriber-appIds includes actionParam-appId, for save - create/update tasks.
# Constants
No description provided by the author
No description provided by the author
constants LogTypes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
constants LogTypes.
No description provided by the author
No description provided by the author
constants LogTypes.
No description provided by the author
No description provided by the author
constants LogTypes.
No description provided by the author
constants LogTypes.
No description provided by the author
constants LogTypes.
No description provided by the author
constants LogTypes.
No description provided by the author
No description provided by the author
No description provided by the author
constants LogTypes.
No description provided by the author
No description provided by the author
TODO: review/update.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AccessInfoType for CheckUserAccess method value (interface{}) response, and to assert returned value.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AppParamsType is the type for validating app-access.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Crud object / struct.
No description provided by the author
CrudParamsType is the struct type for receiving, composing and passing CRUD inputs.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrorType provides the structure for error reporting.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LogParam interfaces / types.
LogParamX interfaces / types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TaskPermissionType for TaskPermission method value (interface{}) response, and to assert returned value.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author