Board cards are stored in the database fields "cash_hand_summary.card_1" to "...card_5" - 1 to 3 are the flop, 4 is the turn and 5 is the river.
The values stored in these fields represent the individual cards - details in
this post (this was written for PT3 so the database fields are different but the values are the same in PT4).
You can compare the three flop card values to determine whether the board is wet or dry using mathematical functions (a few simple examples in the linked post) depending on how you define wet or dry. e.g. By checking that each card is a different rank, there is a certain gap between cards, or they are different suits, etc. These expressions will likely get pretty complex, but it sounds like you have a grasp of how to do this kind of thing.
If you get stuck with a specific example please ask.