Documentation
¶
Index ¶
- type Connection
- func (c Connection) BackupDataBase(callback func(err string))
- func (c Connection) ClearAllTableDataInDB(tables ...string) (err string)
- func (c Connection) CreateObjectsInDB(table_name string, backup_required bool, items any) (err string)
- func (c *Connection) CreateTablesInDB(tables []*model.Object, result func(err string))
- func (c Connection) DeleteObjectsInDB(table_name string, all_data ...map[string]string) (err string)
- func (c Connection) Exists(textResponse, objectSelect, sql string) (ok bool)
- func (c *Connection) Open() *sql.DB
- func (c Connection) QueryAll(sql string, args ...interface{}) (out []map[string]string, err string)
- func (c Connection) QueryOne(sql string, args ...interface{}) (out map[string]string, err string)
- func (c Connection) QueryWithoutANSWER(sql, mje string) bool
- func (c Connection) ReadAsyncDataDB(p model.ReadParams, callback func(r *model.ReadResults, err string))
- func (c Connection) ReadSyncDataDB(p model.ReadParams, data ...map[string]string) (rowsMap []map[string]string, err string)
- func (Connection) RunOnClientDB() bool
- func (c Connection) SelectValue(sql string) (out string, ok bool)
- func (c *Connection) Set(dba databaseAdapter)
- func (c *Connection) TableExist(table_name string) (exist bool, err string)
- func (c *Connection) TestCrudStart(t *testing.T)
- func (c Connection) UpdateObjectsInDB(table_name string, all_data ...map[string]string) (err string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
func (Connection) BackupDataBase ¶ added in v0.0.80
func (c Connection) BackupDataBase(callback func(err string))
func (Connection) ClearAllTableDataInDB ¶ added in v0.0.89
func (c Connection) ClearAllTableDataInDB(tables ...string) (err string)
func (Connection) CreateObjectsInDB ¶ added in v0.0.27
func (c Connection) CreateObjectsInDB(table_name string, backup_required bool, items any) (err string)
support: []map[string]string or map[string]string
func (*Connection) CreateTablesInDB ¶ added in v0.0.35
func (c *Connection) CreateTablesInDB(tables []*model.Object, result func(err string))
func (Connection) DeleteObjectsInDB ¶ added in v0.0.27
func (c Connection) DeleteObjectsInDB(table_name string, all_data ...map[string]string) (err string)
DeleteObjectsInDB borra objetos de la base de datos según nombre de la tabla y ids.
func (Connection) Exists ¶
func (c Connection) Exists(textResponse, objectSelect, sql string) (ok bool)
Exists verifica si existe un que es y algo en la base de datos según sql ej: "la base de datos","tiendadb","sql para la consulta"
func (*Connection) Open ¶
func (c *Connection) Open() *sql.DB
func (Connection) QueryAll ¶
func (c Connection) QueryAll(sql string, args ...interface{}) (out []map[string]string, err string)
QueryAll .
func (Connection) QueryOne ¶
func (c Connection) QueryOne(sql string, args ...interface{}) (out map[string]string, err string)
QueryOne . https://my.oschina.net/nowayout/blog/139398
func (Connection) QueryWithoutANSWER ¶
func (c Connection) QueryWithoutANSWER(sql, mje string) bool
QueryWithoutANSWER SinResultado ejecuta sql en bd con sin respuesta de mas de 1 operación recibe sql y mensaje a mostrar en consola
func (Connection) ReadAsyncDataDB ¶ added in v0.0.91
func (c Connection) ReadAsyncDataDB(p model.ReadParams, callback func(r *model.ReadResults, err string))
func (Connection) ReadSyncDataDB ¶ added in v0.0.91
func (c Connection) ReadSyncDataDB(p model.ReadParams, data ...map[string]string) (rowsMap []map[string]string, err string)
func (Connection) RunOnClientDB ¶ added in v0.0.72
func (Connection) RunOnClientDB() bool
func (Connection) SelectValue ¶
func (c Connection) SelectValue(sql string) (out string, ok bool)
SelectValue retorna valor de una consulta sql
func (*Connection) Set ¶
func (c *Connection) Set(dba databaseAdapter)
setear conexión base de datos cerrar después de usar
func (*Connection) TableExist ¶ added in v0.0.35
func (c *Connection) TableExist(table_name string) (exist bool, err string)
func (*Connection) TestCrudStart ¶
func (c *Connection) TestCrudStart(t *testing.T)
func (Connection) UpdateObjectsInDB ¶ added in v0.0.27
func (c Connection) UpdateObjectsInDB(table_name string, all_data ...map[string]string) (err string)
UpdateObjectsInDB
Source Files
¶
- backup.go
- clone_testing.go
- connect.go
- create.go
- create_testing.go
- delete.go
- delete_testing.go
- exists.go
- message.go
- method-clear.go
- model.go
- read-value-check.go
- read.go
- read_method.go
- read_testing.go
- table-handler.go
- unit_crud_testing.go
- unit_data_testing.go
- unit_model-test.go
- unit_model_testing.go
- update.go
- update_testing.go
Click to show internal directories.
Click to hide internal directories.