FAQ
This one provides a direct interface and a driver for database/sql. I
don't test the driver at the moment (other than Open/Close), but that
will change in a few days. The code has been tested on Windows and
FreeBSD. I couldn't find a Linux box with a recent enough version of
the SQLite shared library (3.7.14+), so please send me reports of any
successes or failures.

Code: http://code.google.com/p/go-sqlite/
Docs: http://godoc.org/code.google.com/p/go-sqlite/go1/sqlite3

Questions, comments, bug reports, and feature requests are all welcome.

- Max

--
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

  • John Nagle at Feb 12, 2013 at 7:39 pm

    On 2/12/2013 9:35 AM, Maxim Khitrov wrote:
    This one provides a direct interface and a driver for database/sql. I
    don't test the driver at the moment (other than Open/Close), but that
    will change in a few days. The code has been tested on Windows and
    FreeBSD. I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please send me reports of any
    successes or failures.
         One implementation that works perfectly is more useful than many
    implementations, each with their own bugs.

          John Nagle

    --
    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.
  • Minux at Feb 12, 2013 at 7:46 pm

    On Wed, Feb 13, 2013 at 3:39 AM, John Nagle wrote:
    On 2/12/2013 9:35 AM, Maxim Khitrov wrote:
    This one provides a direct interface and a driver for database/sql. I
    don't test the driver at the moment (other than Open/Close), but that
    will change in a few days. The code has been tested on Windows and
    FreeBSD. I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please send me reports of any
    successes or failures.
    One implementation that works perfectly is more useful than many
    implementations, each with their own bugs.
    Right! And of course,
    one language that works perfectly is more useful than many languages,
    each with their idiosyncrasies.

    The problems are:
    1. can anyone design that perfect language?
    2. can anyone write the perfect implementation of the said package?

    --
    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.
  • Maxim Khitrov at Feb 12, 2013 at 7:54 pm

    On Tue, Feb 12, 2013 at 2:39 PM, John Nagle wrote:
    On 2/12/2013 9:35 AM, Maxim Khitrov wrote:
    This one provides a direct interface and a driver for database/sql. I
    don't test the driver at the moment (other than Open/Close), but that
    will change in a few days. The code has been tested on Windows and
    FreeBSD. I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please send me reports of any
    successes or failures.
    One implementation that works perfectly is more useful than many
    implementations, each with their own bugs.
    Agreed :) We had a discussion about this a month ago:

    http://groups.google.com/d/msg/golang-nuts/JmLSOv9MBd8/ceHPsJaAJ5oJ

    Then I started playing with cgo and decided to write this for use in
    my next project... The irony is not lost on me.

    http://xkcd.com/927/

    - Max

    --
    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.
  • Martin Angers at Feb 12, 2013 at 7:58 pm
    Multiple implementations with different approaches is the way to get a
    perfect implementation, if such a thing even exists. Hack on, people.

    Le mardi 12 février 2013 14:39:36 UTC-5, John Nagle a écrit :
    On 2/12/2013 9:35 AM, Maxim Khitrov wrote:
    This one provides a direct interface and a driver for database/sql. I
    don't test the driver at the moment (other than Open/Close), but that
    will change in a few days. The code has been tested on Windows and
    FreeBSD. I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please send me reports of any
    successes or failures.
    One implementation that works perfectly is more useful than many
    implementations, each with their own bugs.

    John Nagle
    --
    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.
  • Rui Maciel at Feb 12, 2013 at 8:37 pm

    On 02/12/2013 07:39 PM, John Nagle wrote:
    One implementation that works perfectly is more useful than many
    implementations, each with their own bugs.
    There's those of us who do the work, and then there's those of us who
    complain about others doing the work. Progress doesn't come from the
    latter group.


    Rui Maciel

    --
    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.
  • Maxim Khitrov at Apr 6, 2013 at 9:12 pm

    On Tue, Feb 12, 2013 at 12:35 PM, Maxim Khitrov wrote:
    This one provides a direct interface and a driver for database/sql. I
    don't test the driver at the moment (other than Open/Close), but that
    will change in a few days. The code has been tested on Windows and
    FreeBSD. I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please send me reports of any
    successes or failures.

    Code: http://code.google.com/p/go-sqlite/
    Docs: http://godoc.org/code.google.com/p/go-sqlite/go1/sqlite3

    Questions, comments, bug reports, and feature requests are all welcome.
    I've updated the package to take advantage of the host linker support
    in tip (Go 1.1). The SQLite amalgamation source is now compiled into
    the package on all platforms. Go 1.0 on *nix continues to be
    supported, but depends on the shared library. Static linking with tip
    has been tested on CentOS 5, FreeBSD 9, and Windows 7 (all 64-bit).
    Big thanks to everyone who worked on adding support for the host
    linker to Go 1.1. :)

    The SQLite source has also been updated to version 3.7.16.1. Enjoy!

    - Max

    --
    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.
  • Maxim Khitrov at May 25, 2013 at 2:26 pm

    On Sat, Apr 6, 2013 at 5:04 PM, Maxim Khitrov wrote:
    On Tue, Feb 12, 2013 at 12:35 PM, Maxim Khitrov wrote:
    This one provides a direct interface and a driver for database/sql. I
    don't test the driver at the moment (other than Open/Close), but that
    will change in a few days. The code has been tested on Windows and
    FreeBSD. I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please send me reports of any
    successes or failures.

    Code: http://code.google.com/p/go-sqlite/
    Docs: http://godoc.org/code.google.com/p/go-sqlite/go1/sqlite3

    Questions, comments, bug reports, and feature requests are all welcome.
    I've updated the package to take advantage of the host linker support
    in tip (Go 1.1). The SQLite amalgamation source is now compiled into
    the package on all platforms. Go 1.0 on *nix continues to be
    supported, but depends on the shared library. Static linking with tip
    has been tested on CentOS 5, FreeBSD 9, and Windows 7 (all 64-bit).
    Big thanks to everyone who worked on adding support for the host
    linker to Go 1.1. :)
    Just a heads up - I'm going to drop Go 1.0 support for this package in
    about a week. This will allow me to remove the code that deals with
    the shared library. For now, I've updated the amalgamation source to
    version 3.7.17, which adds support for memory-mapped I/O:

    http://www.sqlite.org/mmap.html

    --
    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.
  • 谭俊青 at May 28, 2013 at 4:10 pm
    I am looking for a sqlite3 lib that could be static linked.
    On Sunday, April 7, 2013 5:04:47 AM UTC+8, Maxim Khitrov wrote:
    On Tue, Feb 12, 2013 at 12:35 PM, Maxim Khitrov wrote:
    This one provides a direct interface and a driver for database/sql. I
    don't test the driver at the moment (other than Open/Close), but that
    will change in a few days. The code has been tested on Windows and
    FreeBSD. I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please send me reports of any
    successes or failures.

    Code: http://code.google.com/p/go-sqlite/
    Docs: http://godoc.org/code.google.com/p/go-sqlite/go1/sqlite3

    Questions, comments, bug reports, and feature requests are all welcome.
    I've updated the package to take advantage of the host linker support
    in tip (Go 1.1). The SQLite amalgamation source is now compiled into
    the package on all platforms. Go 1.0 on *nix continues to be
    supported, but depends on the shared library. Static linking with tip
    has been tested on CentOS 5, FreeBSD 9, and Windows 7 (all 64-bit).
    Big thanks to everyone who worked on adding support for the host
    linker to Go 1.1. :)

    The SQLite source has also been updated to version 3.7.16.1. Enjoy!

    - Max
    --
    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.
  • Andrey mirtchovski at May 28, 2013 at 4:18 pm
    mattn's go-sqlite3 library builds static by default. notice no
    libsqlite3.dylib below.

    $ go get github.com/mattn/go-sqlite3/example && otool -L `which example`
    ~/bin/example:
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
    version 169.3.0)

    --
    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.
  • Maxim Khitrov at May 28, 2013 at 4:28 pm

    On Tue, May 28, 2013 at 12:18 PM, andrey mirtchovski wrote:
    mattn's go-sqlite3 library builds static by default. notice no
    libsqlite3.dylib below.

    $ go get github.com/mattn/go-sqlite3/example && otool -L `which example`
    ~/bin/example:
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
    version 169.3.0)
    I think this is OS-specific. Windows should be static
    (sqlite3_windows.c is the amalgamation), but on FreeBSD I get:

    example:
             libsqlite3.so.8 => /usr/local/lib/libsqlite3.so.8 (0x80098e000)
             libthr.so.3 => /lib/libthr.so.3 (0x800c32000)
             libc.so.7 => /lib/libc.so.7 (0x800e55000)

    --
    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.
  • Andrey mirtchovski at May 28, 2013 at 4:30 pm
    Yes, I get a dynamic lib linked in with a fresh install on linux. It
    appears that I dropped in the amalgamation in the folder as I was
    testing 3.7.17. My bad.

    --
    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.
  • Maxim Khitrov at May 28, 2013 at 4:23 pm
    The SQLite amalgamation is compiled into this package with Go 1.1. If
    you mean linking in libsqlite3.a, I haven't tried it, but it should
    also be possible (play with #cgo lines).
    On Tue, May 28, 2013 at 10:15 AM, 谭俊青 wrote:
    I am looking for a sqlite3 lib that could be static linked.
    On Sunday, April 7, 2013 5:04:47 AM UTC+8, Maxim Khitrov wrote:
    On Tue, Feb 12, 2013 at 12:35 PM, Maxim Khitrov wrote:
    This one provides a direct interface and a driver for database/sql. I
    don't test the driver at the moment (other than Open/Close), but that
    will change in a few days. The code has been tested on Windows and
    FreeBSD. I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please send me reports of any
    successes or failures.

    Code: http://code.google.com/p/go-sqlite/
    Docs: http://godoc.org/code.google.com/p/go-sqlite/go1/sqlite3

    Questions, comments, bug reports, and feature requests are all welcome.
    I've updated the package to take advantage of the host linker support
    in tip (Go 1.1). The SQLite amalgamation source is now compiled into
    the package on all platforms. Go 1.0 on *nix continues to be
    supported, but depends on the shared library. Static linking with tip
    has been tested on CentOS 5, FreeBSD 9, and Windows 7 (all 64-bit).
    Big thanks to everyone who worked on adding support for the host
    linker to Go 1.1. :)

    The SQLite source has also been updated to version 3.7.16.1. Enjoy!

    - Max
    --
    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.
    --
    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.
  • Tong Sun at Apr 8, 2013 at 12:59 am

    On Tuesday, February 12, 2013 12:35:25 PM UTC-5, Maxim Khitrov wrote:
    I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please ...
    which make it impossible for me to use under my Linux.

    Anyone knows a SQLite package that is *ready for use* for Linux? The SQLite
    shared library under my Linux is 2.8.17.

    Thanks

    --
    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.
  • Tong Sun at Apr 8, 2013 at 1:07 am

    On Sunday, April 7, 2013 8:59:32 PM UTC-4, Tong Sun wrote:

    On Tuesday, February 12, 2013 12:35:25 PM UTC-5, Maxim Khitrov wrote:

    I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please ...
    which make it impossible for me to use under my Linux.

    Anyone knows a SQLite package that is *ready for use* for Linux? The
    SQLite shared library under my Linux is 2.8.17.
    Found out that my sqlite3 is of 3.7.9, will try
    https://github.com/mattn/go-sqlite3

    sorry for the noise.


    --
    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.
  • Maxim Khitrov at Apr 8, 2013 at 1:19 am

    On Sun, Apr 7, 2013 at 9:07 PM, Tong Sun wrote:
    On Sunday, April 7, 2013 8:59:32 PM UTC-4, Tong Sun wrote:


    On Tuesday, February 12, 2013 12:35:25 PM UTC-5, Maxim Khitrov wrote:

    I couldn't find a Linux box with a recent enough version of
    the SQLite shared library (3.7.14+), so please ...

    which make it impossible for me to use under my Linux.

    Anyone knows a SQLite package that is ready for use for Linux? The SQLite
    shared library under my Linux is 2.8.17.

    Found out that my sqlite3 is of 3.7.9, will try
    https://github.com/mattn/go-sqlite3

    sorry for the noise.
    My package no longer requires the shared library when building with
    tip (Go 1.1). I always intended for it to be self-contained once the
    host linker issue was resolved, so maintaining compatibility with
    older versions of the library wasn't a priority.

    - Max

    --
    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.
  • Kevin Gillette at Apr 8, 2013 at 1:27 am
    Out of interest, were there any steps you needed to take to get it to build
    statically with the host linker support, or will cgo now attempt static
    builds unless directed otherwise?
    On Sunday, April 7, 2013 7:18:31 PM UTC-6, Maxim Khitrov wrote:

    My package no longer requires the shared library when building with
    tip (Go 1.1). I always intended for it to be self-contained once the
    host linker issue was resolved, so maintaining compatibility with
    older versions of the library wasn't a priority.

    - Max
    --
    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.
  • Maxim Khitrov at Apr 8, 2013 at 1:46 am
    SQLite needed libdl on Linux, so I just added "#cgo linux LDFLAGS:
    -ldl" and cgo took care of the rest. Nothing else was needed.

    - Max

    On Sun, Apr 7, 2013 at 9:26 PM, Kevin Gillette
    wrote:
    Out of interest, were there any steps you needed to take to get it to build
    statically with the host linker support, or will cgo now attempt static
    builds unless directed otherwise?

    On Sunday, April 7, 2013 7:18:31 PM UTC-6, Maxim Khitrov wrote:

    My package no longer requires the shared library when building with
    tip (Go 1.1). I always intended for it to be self-contained once the
    host linker issue was resolved, so maintaining compatibility with
    older versions of the library wasn't a priority.

    - Max
    --
    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
postedFeb 12, '13 at 5:35p
activeMay 28, '13 at 4:30p
posts18
users9
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase