UNPKG

@onurege3467/zerohelper

Version:

ZeroHelper is a versatile JavaScript library offering helper functions and database utilities for developers. It supports MongoDB, MySQL, SQLite, Redis, and PostgreSQL.

11 lines (9 loc) 300 B
"use strict"; const errors = require('../errors/strings.js'); module.exports = async function(){ let tables = await this.tables(); if(!tables.length) throw new TypeError(errors.noTablesExisted); let ms = Date.now(); await this.query(`SELECT * from \`${tables[0]}\``); return Date.now() - ms; }