Skip to main content

APEX Deployment Tool - Searching

D

Did you ever wondered which database objects are used in your application, in the whole application or just on a specific page? Or to find out where is the specific database object used? Or to find out at which commit was you database object dropped (or created, changed)?


This is part of multiple ADT articles:


Searching APEX

The solution for searching APEX is based on parsing the Embedded code report export. So when you have this in your repo (and this is part of the next article on export_apex action), the searching is also faster then searching in APEX, it is also more accurate and the result list is much shorter, because it show just list of objects and pages as a table without all the clutter around.

cd ~/Documents/YOUR_PROJECT_REPO/; adt search_apex
cd ~/Documents/YOUR_PROJECT_REPO/; adt search_apex -app 100
cd ~/Documents/YOUR_PROJECT_REPO/; adt search_apex -app 100 -page 1
cd ~/Documents/YOUR_PROJECT_REPO/; adt search_apex -app 100 -name OBJECT_NAME%


Searching repo

This is for searching different versions of files, but with database objects in mind. Lets check the help page first:

cd ~/Documents/YOUR_PROJECT_REPO/; adt search_repo


This allows you to search repo for specific commit message or for specific file (even if the file was deleted or renamed and does not exists anymore):

cd ~/Documents/YOUR_PROJECT_REPO/; adt search_repo -summary WORD
cd ~/Documents/YOUR_PROJECT_REPO/; adt search_repo -file OBJECT_NAME

This allows you to search repo for specific object and restore old version(s):

cd ~/Documents/YOUR_PROJECT_REPO/; adt search_repo -history OBJECT_NAME
cd ~/Documents/YOUR_PROJECT_REPO/; adt search_repo -history OBJECT_NAME -restore
cd ~/Documents/YOUR_PROJECT_REPO/; adt search_repo -history OBJECT_NAME COMMIT -restore


Comments