【Gerrit】查询用户数据信息
一、查询Gerrit用户数据表ACCOUNTS信息:
1.连接数据库(gerrit.xxx.xxx->gerrit服务域名或IP)
ssh gerrit.xxx.xxx gerrit gsql
2.查询用户信息
select * from accounts where preferred_email like '%annie.xx%';
3.查询结果显示
registered_on | full_name | preferred_email | maximum_page_size | show_site_header | use_flash_clipboard | download_url | download_command | copy_self_on_email | date_format | time_format | relative_date_in_change_table | diff_view | size_bar_in_change_table | legacycid_in_change_table | review_category_strategy | mute_common_path_prefixes | inactive | account_id
---------------------------+-----------+-------------------------+-------------------+------------------+---------------------+--------------+------------------+--------------------+-------------+-------------+-------------------------------+-----------+--------------------------+---------------------------+--------------------------+---------------------------+----------+-----------
2020-03-26 15:57:50.601+08 | XXX | annie.xx@xxx.com | 25 | Y | Y | ssh | NULL | N | NULL | NULL | N | NULL | Y | N | NULL | Y | N | 1001381
(1 row; 2 ms)
4.清除缓存
ssh -p 29418 gerrit.xxx.com gerrit flush-caches --all
5.查询projects("${L_REGEX}"->匹配project)
ssh -p 29418 gerrit.xxx.com gerrit ls-projects --type CODE -r "${L_REGEX}"