Typo3 jQuery OnClick Events

i need some help for my fresh installed Typo3 Website.

I want to set new Values within my DataBase via jQuery onClick Event. So i guess i need to make use of this class: TYPO3\CMS\Core\Database\ConnectionPool. Can someone Guide me how i can make use of this class within JavaScript.

I already tried the following, but i can't get it to work

define(['jquery', 'TYPO3\CMS\Core\Database\ConnectionPool'], function($, conPool) {

   if(conPool.foo == 'bar'){

Typo3 source

I appreciating any Help. Thanks

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum