David said that he turned his eyes continually to God that God might bring his feet out of the net and would turn toward him, be gracious to him, relieve the troubles of his heart, bring him out of his distresses, and look on his affliction and suffering (vv. 15-18a). There is also a mixture here of the divine concept according to the tree of life and the human concept according to the tree of the knowledge of good and evil.
David asked God to look on his many enemies, who hated him with a violent hatred (v. 19). This belongs to the tree of the knowledge of good and evil. Surely David returned hatred to his enemies. This is completely against the principle of the New Testament, which tells us to love our enemies and pray for them (Matt. 5:43-44).
David also asked God to deliver him by keeping his soul and not letting him be put to shame, for he took refuge in God (Psa. 25:20). Then he asked God to preserve him, not because of God's redemption and compassions but because of his integrity and uprightness, for he waited on God (v. 21). He said that he walked in integrity, walked in uprightness, and waited on God. This is also a mixed expression. During his age, there was nothing wrong with waiting on God, but for him to ask God to preserve him because of his integrity is according to the human concept. Integrity means absolute purity plus absolute perfection. David surely was not absolutely pure, perfect, or upright. He should not have asked God to preserve him because of his integrity and uprightness. This kind of thought belongs with the tree of the knowledge of good and evil.
In verse 22 David asked God to redeem Israel out of all his troubles.