title: gorm raw sql query execution
body: <p>Am running a query to check if a table exists or not using the gorm orm for golang. Below is my code.</p>
  <pre><code>package main
  
  import (
      &quot;fmt&quot;
      &quot;log&quot;
  
      &quot;gorm.io/driver/postgres&quot;
      &quot;gorm.io/gorm&quot;
  
      _ &quot;github.com/lib/pq&quot;
  )
  
  // App sets up and runs the app
  type App struct {
      DB *gorm.DB
  }
  
  `const tableCreationQuery = `SELECT count (*) 
  FROM information_schema.TABLES 
  WHERE (TABLE_SCHEMA = 'api_test') AND (TABLE_NAME = 'Users')`
  
  func ensureTableExists() {
      if err := a.DB.Exec(tableCreationQuery); err != nil {
          log.Fatal(err)
      }
  }`
  </code></pre>
  <p>The expected response should be either 1 or 0. I got this from another SO answer. Instead I get this</p>
  <blockquote>
  <p>2020/09/03 00:27:18 &amp;{0xc000148900  1 0xc000119ba0 0}
  exit status 1
  FAIL    go-auth 0.287s</p>
  </blockquote>
  <p>My untrained mind says its a pointer but how do I reference the returned values to determine what was contained within?</p>