/usr/share/doc/dictd/examples/dictd_plugin_dbi.conf is in dictd 1.12.1+dfsg-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #
# This file is example of dictd configuration file
# consisting of one database implemented by DBI plugin.
# postgresql's driver is used
#
# It is assumed that SQL database consists of single table `dict'
# with two columns: `hw' and `def'
#
database_plugin dictionary_name {
# This section specifies the plugin. The
# `dictionary_name' specifies the name of the
# dictionary.
plugin "/usr/local/libexec/dictd/dictdplugin_dbi.so"
data "\
driverdir = \"/usr/lib/dbd/\" \n\
drivername = \"pgsql\" \n\
\
option_host = localhost \n\
option_port = 1234 \n\
option_dbname = SQL_server_database_name \n\
option_username = SQL_server_username \n\
option_password = SQL_server_user_password \n\
\
query_define = \"SELECT def \
FROM dict \
WHERE hw = '%q'\" \n\
\
query_exact = \"SELECT DISTINCT hw \
FROM dict \
WHERE hw = '%q'\" \n\
\
query_prefix = \"SELECT DISTINCT hw \
FROM dict \
WHERE position('%q' in hw)=1\" \n\
\
query_substring = \"SELECT DISTINCT hw \
FROM dict \
WHERE position('%q' in hw) != 0\" \n\
\
query_suffix = \"SELECT DISTINCT hw \
FROM dict \
WHERE \
substring(hw, length(hw) - length('%q') + 1) = '%q'\" \n\
\
query_reverse = \"SELECT DISTINCT hw \
FROM dict \
WHERE position('%q' in def) != 0\" \n\
"
}
|