Git Product home page Git Product logo

Comments (5)

IreneKnapp avatar IreneKnapp commented on July 28, 2024

Yes, this is a good idea and I'll do it hopefully today.

On Sun, Aug 12, 2012 at 8:55 AM, Janne Hellsten [email protected]:

I see that SQLText stores its contents as a String. This may be a problem
for performance.

Would it be possible to change it to ByteString instead? (I realize this
is an API change.)

It's easy to go from ByteString to String, but going from String to
ByteString means increased memory thrashing.

I realize that in some cases it's possible to work-around this by using
SQLBlob instead. But using the "columns" function after "step" means many
fields often get converted to Strings.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3.

-- Irene Knapp

from direct-sqlite.

IreneKnapp avatar IreneKnapp commented on July 28, 2024

Actually now that I think about it, how would you feel about it using Text?

Sent from my iPhone

On Aug 12, 2012, at 8:55 AM, Janne Hellsten [email protected] wrote:

I see that SQLText stores its contents as a String. This may be a problem for performance.

Would it be possible to change it to ByteString instead? (I realize this is an API change.)

It's easy to go from ByteString to String, but going from String to ByteString means increased memory thrashing.

I realize that in some cases it's possible to work-around this by using SQLBlob instead. But using the "columns" function after "step" means many fields often get converted to Strings.


Reply to this email directly or view it on GitHub.

from direct-sqlite.

nurpax avatar nurpax commented on July 28, 2024

I think both are fine. I've used ByteStrings throughout sqlite-simple now, but that's mainly because mysql-simple and postgresql-simple both used ByteStrings for everything (and a bit of Text too for utf8 conversion). I suppose sticking to ByteStrings would mean the user-facing API would depend on one less package/API. But I don't know how big of a worry that is, since my package requires text anyway.

I think I'll ask for convention guidance on database-devel.

from direct-sqlite.

IreneKnapp avatar IreneKnapp commented on July 28, 2024

If the two choices are even enough that we need to ask for community opinion, I guess that means you won't mind if I use my status as dictator of this particular package to declare that we'll use Text? Cause I'm doing that. :) I don't think the Text package is an exotic dependency; it deserves to be used pretty widely, since it's solid work and well-maintained. Mostly I'm choosing this because it means the user doesn't need to be concerned with how the text is actually encoded, once they have it out of the database; that's a useful property that they have with String and Text but not with ByteString.

from direct-sqlite.

nurpax avatar nurpax commented on July 28, 2024

Agreed. I'm looking forward to this change, ideally I would cut sqlite-simple over to the new API before my first release.

On 13.8.2012, at 1.43, Irene Knapp [email protected] wrote:

If the two choices are even enough that we need to ask for community opinion, I guess that means you won't mind if I use my status as dictator of this particular package to declare that we'll use Text? Cause I'm doing that. :) I don't think the Text package is an exotic dependency; it deserves to be used pretty widely, since it's solid work and well-maintained. Mostly I'm choosing this because it means the user doesn't need to be concerned with how the text is actually encoded, once they have it out of the database; that's a useful property that they have with String and Text but not with ByteString.


Reply to this email directly or view it on GitHub.

from direct-sqlite.

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.