flaarum

package module
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 10 Imported by: 0

README

flaarum

GoDoc

A database that enforces structures and features its own query language.

Why a new database.

  1. Every data stored in this database is automatically indexed. Text fields are indexed with full text search indexes.

  2. Table Expansion (a more comfortable form of joins)

  3. Can make any changes to any table's structure even though you have data in the table.

Regular Features

  1. Supports its own query language.

Technologies Used.

  • Golang
  • Linux
  • HTTPS
  • JSON

Documentation

The tutorial pages is located at sae.ng.

API documentation can be found on godoc

License

Released with the MIT License

Documentation

Overview

this package 'flaarum' is the golang library for communicating with the flaarum server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Addr     string
	KeyStr   string
	ProjName string
}

func NewClient

func NewClient(ip, keyStr, projName string) Client

func NewClientCustomPort added in v1.9.1

func NewClientCustomPort(ip, keyStr, projName string, port int) Client

Used whenever you changed the default port

func (Client) AllRowsCount

func (cl Client) AllRowsCount(tableName string) (int64, error)

func (*Client) ConvertInterfaceMapToStringMap added in v1.10.0

func (cl *Client) ConvertInterfaceMapToStringMap(tableName string, oldMap map[string]interface{}) (map[string]string, error)

func (Client) CountRows

func (cl Client) CountRows(stmt string) (int64, error)

func (*Client) CreateOrUpdateTable added in v1.9.5

func (cl *Client) CreateOrUpdateTable(stmt string) error

func (*Client) CreateProject

func (cl *Client) CreateProject(projName string) error

func (*Client) CreateTable

func (cl *Client) CreateTable(stmt string) error

func (*Client) DeleteProject

func (cl *Client) DeleteProject(projName string) error

func (Client) DeleteRows

func (cl Client) DeleteRows(stmt string) error

func (*Client) DeleteTable

func (cl *Client) DeleteTable(tableName string) error

func (*Client) GetCurrentTableStructureParsed

func (cl *Client) GetCurrentTableStructureParsed(tableName string) (flaarum_shared.TableStruct, error)

func (*Client) GetCurrentTableVersionNum

func (cl *Client) GetCurrentTableVersionNum(tableName string) (int64, error)

func (*Client) GetTableStructure

func (cl *Client) GetTableStructure(tableName string, versionNum int64) (string, error)

func (*Client) GetTableStructureParsed

func (cl *Client) GetTableStructureParsed(tableName string, versionNum int64) (flaarum_shared.TableStruct, error)

func (*Client) InsertRowAny

func (cl *Client) InsertRowAny(tableName string, toInsert map[string]interface{}) (int64, error)

InsertRowStr inserts a row into a table. It expects the toInsert to be of type map[string]interface{}.

func (*Client) InsertRowStr

func (cl *Client) InsertRowStr(tableName string, toInsert map[string]string) (int64, error)

InsertRowStr inserts a row into a table. It expects the input to be of type map[string]string. It returns the id of the newly created row

func (*Client) ListProjects

func (cl *Client) ListProjects() ([]string, error)

func (Client) ListTables

func (cl Client) ListTables() ([]string, error)

func (*Client) ParseRow

func (cl *Client) ParseRow(rowStr map[string]string, tableStruct flaarum_shared.TableStruct) (map[string]interface{}, error)

ParseRow given a TableStruct would convert a map of strings to a map of interfaces.

func (*Client) Ping

func (cl *Client) Ping() error

func (*Client) RenameProject

func (cl *Client) RenameProject(projName, newProjName string) error

func (*Client) Search

func (cl *Client) Search(stmt string) (*[]map[string]interface{}, error)

func (Client) SearchForOne

func (cl Client) SearchForOne(stmt string) (*map[string]interface{}, error)

func (Client) SumRows

func (cl Client) SumRows(stmt string) (interface{}, error)

Sums the fields of a row and returns int64 if it is an int field

func (Client) UpdateRowsAny

func (cl Client) UpdateRowsAny(stmt string, updateData map[string]interface{}) error

func (Client) UpdateRowsStr

func (cl Client) UpdateRowsStr(stmt string, updateDataStr map[string]string) error

func (*Client) UpdateTableStructure

func (cl *Client) UpdateTableStructure(stmt string) error

type ConnError

type ConnError struct {
	// contains filtered or unexported fields
}

func (ConnError) Error

func (e ConnError) Error() string

type ServerError

type ServerError struct {
	// contains filtered or unexported fields
}

func (ServerError) Error

func (e ServerError) Error() string

type ValidationError

type ValidationError struct {
	// contains filtered or unexported fields
}

func (ValidationError) Error

func (e ValidationError) Error() string

Directories

Path Synopsis
cli provides a terminal interface to the flaarum server.
cli provides a terminal interface to the flaarum server.
This package contains functions shared by the programs of this project.
This package contains functions shared by the programs of this project.
prod provides the commands which helps in making a flaarum server production ready.
prod provides the commands which helps in making a flaarum server production ready.
This is the server that accepts and stores data from clients.
This is the server that accepts and stores data from clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL