FAQ
Hi all. I have some data that can be in sqlite3 db, or in text/plain files.
Now i have stupid strings.Split/switch solution that works on string like:
group=base and name=xxx, but this is ugly =(
Where i can find some package that can helps me ?=)

p.s. underline data represented in struct like
name string
version string
desc string
isize int
csize int
groups []string
....


--
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • DisposaBoy at Nov 28, 2013 at 3:45 pm

    On Thursday, November 28, 2013 12:33:52 AM UTC-5, Vasiliy Tolstov wrote:
    Hi all. I have some data that can be in sqlite3 db, or in text/plain
    files.
    Now i have stupid strings.Split/switch solution that works on string like:
    group=base and name=xxx, but this is ugly =(
    Where i can find some package that can helps me ?=)
    Help with what exactly? I think you're maybe asking about something to
    parse this data? I'd just use `json` or some other text serialization
    format instead of inventing a new one.

    p.s. underline data represented in struct like
    name string
    version string
    desc string
    isize int
    csize int
    groups []string
    ....


    --
    Vasiliy Tolstov,
    e-mail: v.to...@selfip.ru <javascript:>
    jabber: va...@selfip.ru <javascript:>
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Vasiliy Tolstov at Nov 29, 2013 at 7:55 am

    2013/11/28 DisposaBoy <disposaboy@dby.me>:
    Help with what exactly? I think you're maybe asking about something to parse
    this data? I'd just use `json` or some other text serialization format
    instead of inventing a new one.

    Help with parsing string like select name from packages where
    license='bsd' and group='base'...
    I don';t want to reinvent sql / ql parser, but not want to parse
    original data and import it to some sql db and use after that.
    --
    Vasiliy Tolstov,
    e-mail: v.tolstov@selfip.ru
    jabber: vase@selfip.ru

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Peter S at Nov 29, 2013 at 9:14 am
    Am I correct in my understanding that you have this data in a (sqlite)
    database now?

    If so, there are several tools that let you export this data into a common
    format such as CSV. From there you can use the CSV package<http://golang.org/pkg/encoding/csv/>to read the values, and implement a simple function to convert the
    result to your own type.
    On Friday, November 29, 2013 8:55:36 AM UTC+1, Vasiliy Tolstov wrote:

    2013/11/28 DisposaBoy <dispo...@dby.me <javascript:>>:
    Help with what exactly? I think you're maybe asking about something to parse
    this data? I'd just use `json` or some other text serialization format
    instead of inventing a new one.

    Help with parsing string like select name from packages where
    license='bsd' and group='base'...
    I don';t want to reinvent sql / ql parser, but not want to parse
    original data and import it to some sql db and use after that.
    --
    Vasiliy Tolstov,
    e-mail: v.to...@selfip.ru <javascript:>
    jabber: va...@selfip.ru <javascript:>
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Vasiliy Tolstov at Nov 29, 2013 at 10:43 am

    2013/11/29 Peter S <peterskeide@gmail.com>:
    Am I correct in my understanding that you have this data in a (sqlite)
    database now?

    If so, there are several tools that let you export this data into a common
    format such as CSV. From there you can use the CSV package to read the
    values, and implement a simple function to convert the
    result to your own type.

    No, i have many databases (sqlite3, plain text files (not csv,
    specific format) and want to search from it via common sql like
    syntax.
    I only need sql query parser as i think..

    --
    Vasiliy Tolstov,
    e-mail: v.tolstov@selfip.ru
    jabber: vase@selfip.ru

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Peter S at Nov 29, 2013 at 11:53 am
    Looks like you want an implementation of LINQ (.NET) for Go.

    If you ever implement a generic solution, I'm sure the Go community would
    appreciate an open source version :-)
    On Friday, November 29, 2013 11:43:22 AM UTC+1, Vasiliy Tolstov wrote:

    2013/11/29 Peter S <peter...@gmail.com <javascript:>>:
    Am I correct in my understanding that you have this data in a (sqlite)
    database now?

    If so, there are several tools that let you export this data into a common
    format such as CSV. From there you can use the CSV package to read the
    values, and implement a simple function to convert the
    result to your own type.

    No, i have many databases (sqlite3, plain text files (not csv,
    specific format) and want to search from it via common sql like
    syntax.
    I only need sql query parser as i think..

    --
    Vasiliy Tolstov,
    e-mail: v.to...@selfip.ru <javascript:>
    jabber: va...@selfip.ru <javascript:>
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Vasiliy Tolstov at Nov 29, 2013 at 12:40 pm

    2013/11/29 Peter S <peterskeide@gmail.com>:
    Looks like you want an implementation of LINQ (.NET) for Go.

    If you ever implement a generic solution, I'm sure the Go community would
    appreciate an open source version :-)

    =) Nice =)

    --
    Vasiliy Tolstov,
    e-mail: v.tolstov@selfip.ru
    jabber: vase@selfip.ru

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedNov 28, '13 at 5:34a
activeNov 29, '13 at 12:40p
posts7
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase