1 Kings 9:4

4 As for you, if you will live in my presence, as did David your father, in pureness of heart and uprightness, doing everything I have ordered you to do, and observing my laws and rulings;

1 Kings 9:4 Meaning and Commentary

1 Kings 9:4

And if thou wilt walk before me, as David thy father walked, in
integrity of heart, and in uprightness.
&c.] Who, though guilty of many sins and failings in life, yet was sincere and upright in the worship of God, never apostatized from it, or fell into idolatry, which is what is chiefly respected:

to do according to all that I have commanded thee, and wilt keep my
statutes and my judgments;
observe all the laws of God, moral, ceremonial, and judicial.

1 Kings 9:4 In-Context

2 ADONAI appeared to Shlomo a second time, as he had appeared to him in Giv'on.
3 ADONAI said to him, "I have heard your prayer and your plea that you made before me: I am consecrating this house which you built and placing my name there forever; my eyes and heart will always be there.
4 As for you, if you will live in my presence, as did David your father, in pureness of heart and uprightness, doing everything I have ordered you to do, and observing my laws and rulings;
5 then I will establish the throne of your rulership over Isra'el forever, just as I promised David your father when I said, 'You will never lack a man on the throne of Isra'el.'
6 But if you turn away from following me, you or your children, and do not observe my mitzvot and regulations which I have set before you, and go and serve other gods, worshipping them;
Complete Jewish Bible Copyright 1998 by David H. Stern. Published by Jewish New Testament Publications, Inc. All rights reserved. Used by permission.