Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add schema tables parse function #63

Open
oberstet opened this issue Sep 14, 2020 · 0 comments
Open

Add schema tables parse function #63

oberstet opened this issue Sep 14, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@oberstet
Copy link
Contributor

we currently lack helpers like

for other classes. eg:

(cpy382_1) oberstet@intel-nuci7:~/scm/crossbario/xbr-www/cloud/planet_xbr_crossbarfx$ make import_db 
crossbarfx shell import database \
	/tmp/.xbrnetwork \
	/tmp/db.dat \
	--include-schemata xbr,xbrnetwork --exclude-tables xbr.blocks


Database table statistics [dbpath="/tmp/.xbrnetwork"]:

xbrnetwork.accounts....................: 20 records
xbrnetwork.idx_accounts_by_username....: 20 records
xbrnetwork.idx_accounts_by_email.......: 11 records
xbrnetwork.idx_accounts_by_wallet......: 14 records
xbrnetwork.verified_actions............: 63 records
xbrnetwork.user_keys...................: 42 records
xbrnetwork.idx_user_key_by_account.....: 42 records

Importing database [dbpath="/tmp/.xbrnetwork", filename="/tmp/db.dat", filesize=52426]:

Traceback (most recent call last):
  File "/home/oberstet/cpy382_1/bin/crossbarfx", line 11, in <module>
    load_entry_point('crossbarfx', 'console_scripts', 'crossbarfx')()
  File "/home/oberstet/scm/crossbario/crossbarfx/crossbarfx/__init__.py", line 221, in run
    sys.exit(main.run())
  File "/home/oberstet/scm/crossbario/crossbarfx/crossbarfx/shell/main.py", line 1412, in run
    cli()  # pylint: disable=E1120
  File "/home/oberstet/cpy382_1/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/oberstet/cpy382_1/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/oberstet/cpy382_1/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/oberstet/cpy382_1/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/oberstet/cpy382_1/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/oberstet/cpy382_1/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/oberstet/cpy382_1/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/oberstet/scm/crossbario/crossbarfx/crossbarfx/shell/main.py", line 426, in cmd_import_database
    exporter.import_database(filename,
  File "/home/oberstet/scm/crossbario/cfxdb/cfxdb/exporter.py", line 257, in import_database
    val = table.parse(val)
AttributeError: 'TokenApprovals' object has no attribute 'parse'
Makefile:146: recipe for target 'import_db' failed
make: *** [import_db] Error 1
@oberstet oberstet added the enhancement New feature or request label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant