view · edit · sidebar · attach · print · history

How do I query the database? SQL does not work with

Generally, you will not find data in an odba-database with an ad-hoc sql-query, since it is all encoded with base64 (which was the easiest way to store marshalled ruby objects without breaking sql).

The email in ydim is indeed not the address that is being used in the swissmedic-updater. Instead, it's an instance variable in the company object.

Look at SwissmedicPlugin#mail_notifications. There you have: 

 if(... (email = cmp.swissmedic_email))

To see all companies that have a swissmedic-email configured, you can use this command in the oddb admin-tool:

 ch.oddb> do |comp| comp.swissmedic_email end

This will probably simply output 'Array', since in the admin-tool, very long results are reduced with .class.to_s

But you can get various informations about it:

How many Companies have a swissmedic_email configured:

 ch.oddb> do |comp| comp.swissmedic_email end.size

What emails are being used:

 ch.oddb> companies.values.collect do |comp| comp.swissmedic_email end.compact.inspect

and so on.

How do I add a new user for Using yus

Use the yus_add_user tool (in git/yus/bin)

 $> yus_add_user login ch.oddb.RootUser

> I used a Ruby script (Digest::SHA256 class) instead of gpg command to create > SHA256 hash value, then yus_add_user command worked!!

view · edit · sidebar · attach · print · history
Page last modified on January 12, 2012, at 02:33 PM