]>
gitweb.michael.orlitzky.com - mailshears.git/blob - mv/plugins/davical.rb
3 require 'common/davical_plugin'
8 # DAViCal only supports Postgres, so even if we ever are
9 # database-agnostic, this plugin can't be.
15 def mv_domain(from
, to
)
16 # DAViCal doesn't have a concept of domains.
21 # Delete the given username. DAViCal uses foreign keys properly
22 # and only supports postgres, so we let the ON UPDATE CASCADE
23 # trigger handle most of the work.
24 sql_queries
= ['UPDATE usr SET username = $1 WHERE username = $2']
27 connection
= PGconn
.connect(@db_host,
35 sql_queries
.each
do |sql_query
|
36 connection
.query(sql_query
, [to
, from
])
42 # Pretend like we're database-agnostic in case we ever are.
43 raise DatabaseError
.new(e
)