We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, maybe I dont undestand how it works but, I prepare an example, which completely confuses me. Here is the code:
package main import ( "fmt" "github.com/kelindar/column" ) func main() { str() fmt.Println() int() } func str() { coll := column.NewCollection() coll.CreateColumn("id", column.ForInt64()) coll.CreateColumn("data", column.ForString()) coll.CreateIndex("1", "id", func(r column.Reader) bool { return r.Int() == 1 }) dd := []string{"aaa", "bbb", "ccc", "ddd"} for i, d := range dd { coll.Insert(map[string]interface{}{"id": i, "data": d}) } coll.Query(func(tx *column.Txn) error { tx.With("1").Select(func(v column.Selector) { fmt.Printf("%v: %v\n", v.ValueAt("id"), v.ValueAt("data")) }) return nil }) } func int() { coll := column.NewCollection() coll.CreateColumn("id", column.ForInt64()) coll.CreateColumn("data", column.ForInt64()) coll.CreateIndex("1", "id", func(r column.Reader) bool { return r.Int() == 1 }) dd := []int64{100, 200, 300, 400} for i, d := range dd { coll.Insert(map[string]interface{}{"id": i, "data": d}) } coll.Query(func(tx *column.Txn) error { tx.With("1").Select(func(v column.Selector) { fmt.Printf("%v: %v\n", v.ValueAt("id"), v.ValueAt("data")) }) return nil }) }
and an output, which is the same on both apple silicon and apple intel macs:
0: ddd 1: ddd 2: ddd 3: ddd 0: 100 1: 200 2: 300 3: 400
So, which behaviour confused me, in str-func, I expect to see output:
str
1: bbb
similarly, in intI expect something like:
int
1: 200
But same code works different for different data types and, as I think, not solve problem to get values by index.
The text was updated successfully, but these errors were encountered:
@irr123 both are bugs, was able to reproduce them and are going to fix them soon
Sorry, something went wrong.
Fix #13
f7f10e0
Fix #13 (#14)
a060bc5
Merge pull request #3 from kelindar/main
f74ce8a
Fix kelindar#13 (kelindar#14)
Successfully merging a pull request may close this issue.
Hello, maybe I dont undestand how it works but, I prepare an example, which completely confuses me. Here is the code:
and an output, which is the same on both apple silicon and apple intel macs:
So, which behaviour confused me, in
str
-func, I expect to see output:similarly, in
int
I expect something like:But same code works different for different data types and, as I think, not solve problem to get values by index.
The text was updated successfully, but these errors were encountered: