Compare commits

...

2 Commits

Author SHA1 Message Date
d5db656ca2 resolve with indexing (#1) 2025-05-18 21:38:12 -04:00
369d445637 run goinputs 2025-05-18 20:20:40 -04:00
5 changed files with 9 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ func dbGetUser(id string) (*User, error) {
func dbGetUserByName(username string) (*User, error) { func dbGetUserByName(username string) (*User, error) {
// This will be deprecated soon after implementing https://git.dubyatp.xyz/williamp/chatservice_concept/issues/1 // This will be deprecated soon after implementing https://git.dubyatp.xyz/williamp/chatservice_concept/issues/1
query := `SELECT id, name, password FROM users WHERE name = ? ALLOW FILTERING` query := `SELECT id, name, password FROM users WHERE name = ?`
var user User var user User
err := db.Session.Query(query, username).Scan(&user.ID, &user.Name, &user.Password) err := db.Session.Query(query, username).Scan(&user.ID, &user.Name, &user.Password)
if err == gocql.ErrNotFound { if err == gocql.ErrNotFound {

View File

@@ -1,8 +1,9 @@
package decimal package decimal
import ( import (
"gopkg.in/inf.v0"
"reflect" "reflect"
"gopkg.in/inf.v0"
) )
func Marshal(value interface{}) ([]byte, error) { func Marshal(value interface{}) ([]byte, error) {

View File

@@ -2,12 +2,13 @@ package decimal
import ( import (
"fmt" "fmt"
"gopkg.in/inf.v0"
"math/big" "math/big"
"reflect" "reflect"
"strconv" "strconv"
"strings" "strings"
"gopkg.in/inf.v0"
"github.com/gocql/gocql/serialization/varint" "github.com/gocql/gocql/serialization/varint"
) )

View File

@@ -2,8 +2,9 @@ package decimal
import ( import (
"fmt" "fmt"
"gopkg.in/inf.v0"
"reflect" "reflect"
"gopkg.in/inf.v0"
) )
func Unmarshal(data []byte, value interface{}) error { func Unmarshal(data []byte, value interface{}) error {

View File

@@ -2,10 +2,11 @@ package decimal
import ( import (
"fmt" "fmt"
"gopkg.in/inf.v0"
"reflect" "reflect"
"strconv" "strconv"
"gopkg.in/inf.v0"
"github.com/gocql/gocql/serialization/varint" "github.com/gocql/gocql/serialization/varint"
) )