Giter VIP home page Giter VIP logo

Comments (4)

w1ndy avatar w1ndy commented on August 16, 2024

I looked into the test and found that Columns seems to retrieve column names by design... I wonder why this method is needed since there already exists similar ones like ColumnNames and ColumnTypes. Maybe we can change its behavior to retrieve values or replace it with a new method called Values?

from azure-kusto-go.

element-of-surprise avatar element-of-surprise commented on August 16, 2024

This is a leave over from my early design work that has somehow managed to stay in here. Kudos for finding it.

When I was doing the first drafts I was looking at both database/sql, spanner's and a few other APIs.

I blame too many late nights for this, but this is really a completely wrong implementation. The kind of thing I should have said, what the hell are you doing.......

What this should be doing is exactly what you said, grabbing the value from those positional locations in the row.

We should probably have this functionality, but this is now kind of a pickle. It can't be Values, we offer an attribute that provides the Values. We can't change it, because that could cause someone some consequences.

I'm not the current maintainer, so I've sent this up the chain to see what they want to do.

from azure-kusto-go.

w1ndy avatar w1ndy commented on August 16, 2024

@element-of-surprise @yogilad Thanks for your effort! I think this issue may be addressed as follows:

  1. Decouple the logic of boolConvert, dateTimeConvert, etc from row.ToStruct so they can be reused for any given reflect.Type and reflect.Value, instead of being tied to struct fields;
  2. Add a new method (could be called ExtractValues or whatever) to read values from a row easily.

How do you like these changes? I can help implement them.

from azure-kusto-go.

w1ndy avatar w1ndy commented on August 16, 2024

Fixed by #75

from azure-kusto-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.