diff --git a/src/demo/resources/demo/script/scriptdb.ben.xml b/src/demo/resources/demo/script/scriptdb.ben.xml index cc9345a1..4b6151e7 100644 --- a/src/demo/resources/demo/script/scriptdb.ben.xml +++ b/src/demo/resources/demo/script/scriptdb.ben.xml @@ -30,6 +30,12 @@ return query; } + // db get entitiy count + function getEntityCount(entity) { + const count = db.countEntities(entity); + print('entity count for ' + entity + ' : ' + count); + } + @@ -87,4 +93,8 @@ + Printing entity count using JS and AbstractDatabase countEntities function + getEntityCount('playlist'); + getEntityCount('TRACK'); + getEntityCount('PLAYLIST_TRACK'); \ No newline at end of file