func (cl *Client) FetchTableNames() (tableNames []string, err error) {
	var q, v string
	switch cl.DriverName {
	case DriverNameMysql, DriverNamePostgres:
		q = `
			SELECT
				table_name
			FROM
				information_schema.tables
			ORDER BY
				table_name
		`
	}
	rows, err := cl.DB.Query(q)
	if err != nil {
		return nil, fmt.Errorf("FetchTableNames: " + err.Error())
	}
	if len(cl.TableNames) > 0 {
		cl.TableNames = cl.TableNames[:0]
	}
	for rows.Next() {
		err = rows.Scan(&v)
		if err != nil {
			_ = rows.Close()
			return cl.TableNames, err
		}
		cl.TableNames = append(cl.TableNames, v)
	}
	err = rows.Err()
	if err != nil {
		return nil, err
	}
	return cl.TableNames, nil
}
FetchTableNames return the table names in current database schema sorted
in ascending order.
package sql
import (
	"database/sql"
	"errors"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"os"
	"path"
	"path/filepath"
	"sort"
	"strings"
	"github.com/shuLhan/share/lib/reflect"
)
const (
	sqlExtension = ".sql"
)
type Client struct {
	*sql.DB
	ClientOptions
	TableNames []string  
}
func NewClient(opts ClientOptions) (cl *Client, err error) {
	db, err := sql.Open(opts.DriverName, opts.DSN)
	if err != nil {
		return nil, fmt.Errorf("sql.NewClient: %w", err)
	}
	cl = &Client{
		DB:            db,
		ClientOptions: opts,
	}
	return cl, nil
}