Skip to content

Commit

Permalink
sql: don't make placeholders case-sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
lasers authored and tobes committed Sep 1, 2018
1 parent ecee83b commit a397b7f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions py3status/modules/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@
Parameters can be placeholders too, eg {host}, {passd}
Format_row placeholders:
{xxx} case-sensitive placeholder name often found in the database
{xxx} case-sensitive placeholder name often found in the database
{xxx} case-sensitive placeholder name often found in the database
{field} placeholders will have the value returned by the query for the field
Color thresholds:
format:
row: print a color based on the number of SQL rows
format_row:
xxx: print a color based on the value of `xxx` placeholder
field: print a color based on the value of `field` placeholder
Requires:
mariadb: fast sql database server, drop-in replacement for mysql
Expand Down Expand Up @@ -65,8 +63,8 @@
# display number of seconds behind master with MySQLdb
sql {
database = 'MySQLdb'
format_row = '\?color=Seconds_Behind_Master {host} is '
format_row += '[{Seconds_Behind_Master}s behind|\?show master]'
format_row = '\?color=seconds_behind_master {host} is '
format_row += '[{seconds_behind_master}s behind|\?show master]'
parameters = {
'host': 'localhost',
'passwd': '********'
Expand Down

0 comments on commit a397b7f

Please sign in to comment.