Then David the king went in, and sat before Yahweh; and he said, Who am I, Yahweh God, and what is my house, that you have brought me thus far?
The Messianic promises of the Psalms, especially in many of them that were written by David, abundantly prove this ultimate understanding on David's part.