Giter Club home page Giter Club logo

kb-spending-tracker's People

kb-spending-tracker's Issues

need ability to edit transactions

I have already made a few mistakes entering in transactions and with no way to edit them I have had to manually run queries from the SQLite shell to balance my account.

I am not sure about the best design for this.

What is needed:

  1. The user needs to be able to see a list of transactions
  2. The user needs to be able to identify a specific transaction that they want to take an action on
  3. The server needs to be able to update a transaction record

First obvious thought for identifying a specific transaction would just be to use the ID of the txn record in the database. However, that won't scale since in the future we could end up having thousands of transactions, which wouldn't present well on a phone screen.

The better solution is to allow the user to specify a range of transactions they want to see and then present a pseudo id for each txn in that range. This means that the server would then need to map these pseudo id's to the actual txn id's and then wait for the id to be used...which would then mean we need some sort of thread-safe cache?

something to think about:
What happens if a user wants to edit a transaction from a previous month? In order to get an accurate balance we would then need to update each summary transaction through time to the present. I don't think this is a huge deal. Odds are I won't be editing a transaction that's over a year old, so it would realistically be only less than 12 updates. This will probably need to be done via a database transaction though.

protect DB writes with mutex

Perhaps I need to add a mutex to the db to ensure only one connection to the database at a time? Particularly important for the monthly balancing since that runs in its own go routine separate from the listen to messages routine

Originally posted by @justinsantoro in #8 (comment)

Refactor tests

Break kst_test.go file into mulitple files and only build db tests on !nodb build flag

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.