stellar-deprecated / stellard

INACTIVE. Server in the Stellar network. Maintains the distributed ledger. Introduces and validates transactions. This repo is not in active development, it is being replaced by stellar-core.
Other
271 stars 60 forks source link

move code in src/Ledger to use proper sql wrapper instead of legacy sql wrapper #152

Open MonsieurNicolas opened 9 years ago

MonsieurNicolas commented 9 years ago

old wrappers are encouraging the use of raw SQL instead of using binding, which is error prone and can lead to failed queries or SQL injections.

Legacy in that case means: src/ripple_app/data/SqliteDatabase.cpp ( SqliteDatabase and SqliteStatement)

it seems that beast:sqdb does what we want, we should standardize on it.

jedmccaleb commented 9 years ago

If we are going to use this please pull it out of beast. We will hopefully drop beast at some point.

vinniefalco commented 9 years ago

Or use the original, which supports different backends (like MySQL or Oracle) http://soci.sourceforge.net/ beast is a much needed interface "firewall": rippled calls into beast, but not the other way around. This facilitates levelization: http://www2.caret.cam.ac.uk/rsfwiki/Wiki.jsp?page=Levelization This follows the principles in the Lakos' book: "Large-Scale C++ Software Design" http://www.amazon.com/gp/product/0201633620/002-7417214-8818440

vinniefalco commented 9 years ago

More about beast: https://stellartalk.org/topic/6464-beast-a-useful-library-and-api-firewall-to-assist-levelization/