dancannon / gorethink_tododemo Goto Github PK
View Code? Open in Web Editor NEWGo RethinkDB Todo List Example Application
License: MIT License
Go RethinkDB Todo List Example Application
License: MIT License
Is this repository deprecated?
E.g. I see this repo is using gorethink struct tags, however "Old-style gorethink struct tags are supported but deprecated."
I'd like to filter with the following code. However I recieve an invalid memory error. I'm curious if you could point me in the right direction. I'm somewhat new to both go and rethink, please excuse my ignorance.
I'd like to search the "name" field for a keyword substring. There's an Expr line in the docs but I'm lost as to what the Field,Nth,Field chaining does. Could you clarify this for me?
Thanks in advance
/*
SearchByKeyword borrowed from imagelib
*/
func (im *ImageService) SearchByKeyword(keyword string) []interface{} {
var err error
rows, err := r.Table("images").Filter(func(row r.RqlTerm) r.RqlTerm {
//Expr("id:0,name:mlucy,foo:bar").Match("name:(\\w+)").Field("groups").Nth(0).Field("str")
s := []string{"^", keyword}
fmt.Printf(strings.Join(s, " "))
return r.Expr(row.Field("name")).Match(s)
}).Run(session)
if err != nil {
fmt.Println(err)
}
fmt.Println(rows)
....
this seems to be not using web sockets yet ?
if i open two tabs, they do not keep up to date.
the code is really well structured. Probably the best example i have seen.
i would be happy to finish it, but need a little more advice.
when using the latest GoRethink driver the app runs into io-timeout every time the Timeout limit (set in server.go) is reached.
with v0.6.3 everything works like expected.
When firing up the demo, there's an error on the main page:
template: index.gohtml:19:28: executing "index.gohtml" at <.Items>: can't evaluate field Items in type []main.TodoItem
Further, attempting to submit an entry works (it is inserted into the DB) however there are http: multiple response.WriteHeader calls
being made.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.