Example #1
0
func GetDatabeSizeResult(db *sqlx.DB) interface{} {
	r := DatabaseSizeResult{}
	err := db.Get(&r, DatabaseSizeSql)
	if err != nil {
		log.Fatal(err)
	}
	return r
}
Example #2
0
func GetNumberOfConnectionResult(db *sqlx.DB) interface{} {
	r := NumberOfConnectionResult{}
	err := db.Get(&r, NumberOfConnectionSql)
	if err != nil {
		log.Fatal(err)
	}
	return r
}
Example #3
0
func GetTableBloatResult(db *sqlx.DB) interface{} {
	r := []TableBloatDatabaseResult{}
	err := db.Select(&r, TableBloatSql)
	if err != nil {
		log.Fatal(err)
	}
	return r
}
Example #4
0
File: query.go Project: rach/pome
func GetTransactionNumberResult(db *sqlx.DB) interface{} {
	if *verbose {
		log.Printf("Fetch Transaction Number")
	}
	r := TransactionNumberResult{}
	err := db.Get(&r, TransactionNumberSql)
	if err != nil {
		log.Fatal(err)
	}
	return r
}
Example #5
0
File: query.go Project: rach/pome
func GetDatabeSizeResult(db *sqlx.DB) interface{} {
	if *verbose {
		log.Printf("Fetch Database Size")
	}
	r := DatabaseSizeResult{}
	err := db.Get(&r, DatabaseSizeSql)
	if err != nil {
		log.Fatal(err)
	}
	return r
}
Example #6
0
File: query.go Project: rach/pome
func GetNumberOfConnectionResult(db *sqlx.DB) interface{} {
	if *verbose {
		log.Printf("Fetch Number of Connections")
	}
	r := NumberOfConnectionResult{}
	err := db.Get(&r, NumberOfConnectionSql)
	if err != nil {
		log.Fatal(err)
	}
	return r
}
Example #7
0
File: query.go Project: rach/pome
func GetTableBloatResult(db *sqlx.DB) interface{} {
	if *verbose {
		log.Printf("Fetch Tables Bloat")
	}
	r := []TableBloatDatabaseResult{}
	err := db.Select(&r, TableBloatSql)
	if err != nil {
		log.Fatal(err)
	}
	return r
}