getting codes from my db is not working. Any advice?

$w . onReady ( async function () {
let RESULTS = await checkData ();
console . log ( "RESULTS: " , RESULTS );
});

function checkData (){
wixdata . query ( “Diamond” )
. find ()
. then (( res )=>{ return res . items })
. catch (( err )=>{ console . log ( err );});
}

import wixData from ‘wix-data’ ;

$w . onReady ( async function () {
let RESULTS = await checkData ();
console . log ( "RESULTS: " , RESULTS );
});

function checkData (){
wixData . query ( “Diamond” )
. find ()
. then (( res )=>{ return res . items })
. catch (( err )=>{ console . log ( err );});
}

Per comments earlier, my database caused confusion and was recreated to eliminate the confusion. Also, it was suggested to open up the permissions. After several trials, I am unable to get it to work. Namely, the wixdata is not defined and collection does not exists.

Any suggestions? Thank you.