519331f823
* Added AssetData transfer object * Added IssueAssetTransactionData transfer object * Reworked qora.assets.Asset into business layer object * Reworked qora.transaction.IssueAssetTransaction into business layer object * Added corresponding AssetRepository and support in TransactionRepository et al * Fixed BlockChain in line with asset changes * Some renaming inside GenesisTransaction to reflect use of transfer object, not business object * Business transaction objects now take Repository param * Moved HSQLDB transaction repositories into a sub-package * Changed HSQLDBSaver.execute(Connection connection) to .execute(Repository repository) to fix visibility issues and allow repository more control in the future if need be * Changed from "return null" statements in HSQLDB repositories to throw DataException when an error occurs. Better to throw than to silently return null? * Added static version of PublicKeyAccount.verify() for when a repository-backed PublicKeyAccount is not needed * Fixed getter/setter code template incorrectly producing "this.this.field = param" |
||
---|---|---|
.settings | ||
src | ||
.classpath | ||
.gitignore | ||
.project | ||
NOTES.md | ||
pom.xml | ||
README.md |
Qora2
To use:
- Use maven to fetch dependencies.
- Build project.
- Fire up an old-gen Qora node.
- Run
src/test/update.java
as a JUnit test to build DB structure. - Run
src/test/migrate.java
as a JUnit test to migrate old Qora blocks to DB.
You should now be able to run src/test/load.java
and src/test/save.java
as JUnit tests demonstrating loading/saving Transactions from/to database.
You can also examine the migrated database using HSQLDB's "sqltool".
It's a good idea to install "rlwrap" (ReadLine wrapper) too as sqltool doesn't support command history/editing!
Typical command line for sqltool would be:
rlwrap java -cp ${HSQLDB_JAR}:${SQLTOOL_JAR} org.hsqldb.cmdline.SqlTool --rcFile=${SQLTOOL_RC} qora
${HSQLDB_JAR}
contains pathname to hsqldb-2.4.0.jar
,
typically ${HOME}/.m2/repository/org/hsqldb/hsqldb/2.4.0/hsqldb-2.4.0.jar
${SQLTOOL_JAR}
contains pathname to where you
downloaded sqltool-2.2.6.jar
${SQLTOOL_RC}
contains pathname to a text file describing Qora2 database,
e.g. ${HOME}/.sqltool.rc
, with contents like:
urlid qora
url jdbc:hsqldb:file:db/test
username SA
password
You could change the line url jdbc:hsqldb:file:db/test
to use a full pathname for easier use.
Another idea is to assign a shell alias in your .bashrc
like:
alias sqltool='rlwrap java -cp ${HSQLDB_JAR}:${SQLTOOL_JAR} org.hsqldb.cmdline.SqlTool --rcFile=${SQLTOOL_RC}'
So you can simply type: sqltool qora