Introduction Installation Projects Tables Inserts Searches Updates Deletes Production Installation Conclusion

Inserts - Flaarum Tutorials

Insertion expects a map[string]interface{} for its data. Flaarum provides no statements for inserts. One would need to use a function call for insertions.

Sample Code

cl := flaarum.NewClient("", "not-yet-ready", "first_proj")
toInsert := map[string]interface{} {
	"userid": 32,
	"roleid": 12,
retid, err := cl.InsertRowAny("user_roles", toInsert)
if err != nil {

The flaarum lib expects the address of the database, its keystring (like a password) and the name of the project.

< Previous Next >