save output to the database as it comes

add -a and --details options as alternatives to --all and --detail

use text_factory = str