Giter Site home page Giter Site logo

Comments (3)

ahnlabb avatar ahnlabb commented on May 29, 2024

Proposal:

  /* Version 5 upgrade summary:
   * Drop tables activity and creator to allow better naming and integer primary key.
   * thanks: 'creator' key (which was the url of a creator) replaced by creator_id
   * donations: 'url' key (which was the url of a creator) replaced by creator_id
   * creators: 'url' becomes multi-valued
   */
  db.version(5).stores({
    activity: null,
    activities: '++id, &url, title, duration, creator_id',
    creator: null,
    creators: '++id, *url, name, ignore',
    thanks: '++id, url, date, title, creator_id',
    donations: '++id, date, creator_id, weiAmount, usdAmount',
  });

Things to discuss:

  • Do we really need indices for the creator URLs (I think we probably don't)
  • Now that we allow multiple urls, which should we take people to when they click the creator
  • How will we represent addresses? These probably don't need to be indexed and thus won't be part of the specified schema but it needs to be decided on. I propose simply:
{
  ethereum: 0xbD2940e549C38Cc6b201767a0238c2C07820Ef35,
}

I'm not sure if the same logic really applies to bitcoin for instance, since bitcoin addresses should be considered single use...

from thankful.

Powersource avatar Powersource commented on May 29, 2024

@ahnlabb about your questions:

  • What exactly do you mean here? But yeah order doesn't matter.
  • Personally I don't get much value from being sent to their "homepage". If I'm clicking on/around a creator it's because I can't remember what I watched/read from them, and in that case, taking me to their homepage doesn't help much. I think the simplest solution is to, on click, show the associated activity, and in turn, clicking an activity takes me to the activity's url (like it does currently). Of course list the creator urls somewhere.
  • Looks good. And we'll worry about bitcoin when we get to that.

Otherwise both comments LGTM!

from thankful.

ahnlabb avatar ahnlabb commented on May 29, 2024

@Powersource

  • Order? What I mean is that indexing takes up space and time when storing a creator. The keys specified in the schema will all be indexed. We can store URLs for every creator by without specifying them in the schema. The only reason to specify them as keys is if we want to retrieve them sorted or search them.
  • Might be a good idea, however it's probably not the behavior I'd expect.
  • 👍

from thankful.

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.