Documentation ¶
Overview ¶
Package codium_lib provides a golang interface to the codium database.
Index ¶
- func CreateProject(address, keyStr, projName string) error
- func DeleteProject(address, keyStr, projName string) error
- type Client
- func (cl Client) CountRows(stmt string) (int64, error)
- func (cl *Client) CreateTable(stmt string) error
- func (cl Client) DeleteFields(stmt string, toDeleteFields []string) error
- func (cl Client) DeleteRows(stmt string) error
- func (cl *Client) DeleteTable(tableName string) error
- func (cl *Client) EmptyTable(tableName string) error
- func (cl *Client) GetCurrentTableDefn(tableName string) (string, error)
- func (cl *Client) GetCurrentTableDefnParsed(tableName string) (codium_shared.TableDefn, error)
- func (cl *Client) GetTableDefn(tableName, version string) (string, error)
- func (cl *Client) GetTableDefnParsed(tableName, version string) (codium_shared.TableDefn, error)
- func (cl *Client) InsertIntoTable(tableName string, toInsert map[string]interface{}) (int64, error)
- func (cl Client) ListProjects() ([]string, error)
- func (cl Client) ListTables() ([]string, error)
- func (cl *Client) ParseRow(rowStr map[string]string, td codium_shared.TableDefn) (map[string]interface{}, error)
- func (cl *Client) Ping() error
- func (cl *Client) RenameProject(projName, newProjName string) error
- func (cl *Client) RenameTable(tableName, newTableName string) error
- func (cl *Client) Search(stmt string) (*[]map[string]interface{}, error)
- func (cl Client) SearchForOne(stmt string) (*map[string]interface{}, error)
- func (cl Client) SumRows(stmt, toSumField string) (interface{}, error)
- func (cl Client) UpdateRows(stmt string, updateData map[string]interface{}) error
- func (cl *Client) UpdateTableDefn(stmt string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProject ¶
A Project is a container of tables
func DeleteProject ¶
Types ¶
type Client ¶
func (*Client) CreateTable ¶
func (Client) DeleteFields ¶
func (Client) DeleteRows ¶
func (*Client) DeleteTable ¶ added in v1.1.4
func (*Client) EmptyTable ¶
func (*Client) GetCurrentTableDefn ¶
func (*Client) GetCurrentTableDefnParsed ¶ added in v1.1.0
func (cl *Client) GetCurrentTableDefnParsed(tableName string) (codium_shared.TableDefn, error)
func (*Client) GetTableDefn ¶ added in v1.1.3
func (*Client) GetTableDefnParsed ¶ added in v1.1.3
func (cl *Client) GetTableDefnParsed(tableName, version string) (codium_shared.TableDefn, error)
func (*Client) InsertIntoTable ¶
func (Client) ListProjects ¶
func (Client) ListTables ¶
func (*Client) ParseRow ¶ added in v1.1.1
func (cl *Client) ParseRow(rowStr map[string]string, td codium_shared.TableDefn) (map[string]interface{}, error)
ParseRow given a TableDefn would convert a map of strings to a map of interfaces.
func (*Client) Ping ¶
Ping checks if the details supplied at the creation of a Client is valid. it returns an error if invalid and nil if not.
func (*Client) RenameProject ¶ added in v1.1.0
func (*Client) RenameTable ¶ added in v1.1.0
func (Client) SearchForOne ¶
func (Client) SumRows ¶
Sums the fields of a row and returns int64 if it is an int field or float64 if it a float field.
func (Client) UpdateRows ¶
func (*Client) UpdateTableDefn ¶
If you wanted to only rename the table, use RenameTable instead.
Click to show internal directories.
Click to hide internal directories.