stellard icon indicating copy to clipboard operation
stellard copied to clipboard

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

Open MonsieurNicolas opened this issue 10 years ago • 3 comments

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.

MonsieurNicolas avatar Oct 24 '14 17:10 MonsieurNicolas

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

jedmccaleb avatar Oct 24 '14 18:10 jedmccaleb

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 avatar Oct 30 '14 01:10 vinniefalco

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

vinniefalco avatar Oct 31 '14 22:10 vinniefalco