Giter VIP home page Giter VIP logo

Comments (6)

kalloc avatar kalloc commented on June 3, 2024

It's about value.go - NewValue

from aerospike-client-go.

khaf avatar khaf commented on June 3, 2024

Aerospike doesn't support float32/64 natively ATM (it's coming though).

As a general rule, a data access library should not do anything implicit behind the user's back, so it would be unwise for us to convert floats to integers - of all things - automatically.

What is possible though, is to convert structs to map[interface{}]interface{} and store those maps.
I'm also looking into marshaling support in the library.

Thoughts?

from aerospike-client-go.

kalloc avatar kalloc commented on June 3, 2024
  1. Do you mean, the best solution is convert float to int in application, not in library?
  2. You can add method, which allow to extend type conversation (i wrote small example http://play.golang.org/p/UuuaaiTVZM)
  3. You can use tags, like tags for json:
type X struct {
    user_id string `aerospike: "NUMERIC"`
    body []byte `aerospike: "STRING"`
}

in this way, we must understand user schema, but sometime this is need

from aerospike-client-go.

khaf avatar khaf commented on June 3, 2024

We released a new client which supports automatic marshaling of objects.

Have a look at Changelog or Marshal Test and let me know.

from aerospike-client-go.

kalloc avatar kalloc commented on June 3, 2024

@khaf thank you :)

from aerospike-client-go.

alexkappa avatar alexkappa commented on June 3, 2024

This is an awesome feature, thanks a lot @khaf!

from aerospike-client-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.