Its hard to not like David. He prays how he actually is, and then expects God to rescue him – for God’s own glory. And, he is right to expect it. He knew God’s character well. (There’s another good story behind this one)
O God, save me by your name,
and vindicate me by your might.
O God, hear my prayer;
give ear to the words of my mouth.
For strangers have risen against me;
ruthless men seek my life;
they do not set God before themselves. Selah
Behold, God is my helper;
the Lord is the upholder of my life.
He will return the evil to my enemies;
in your faithfulness put an end to them.
With a freewill offering I will sacrifice to you;
I will give thanks to your name, O LORD, for it is good.
For he has delivered me from every trouble,
and my eye has looked in triumph on my enemies.
(Psalm 54 ESV)