title: SQL logic error: near "RETURNING": syntax error (1) Go and SQLite
body: <p>I'm creating a crud application and I'm testing the database with an in-memory DB.
  The only test and functions that are breaking are the toggleTask func and test.</p>
  <p>function:</p>
  <pre><code>func (r *Repository) ToggleTask(task Task) (Task, error) {
      query := &quot;UPDATE Tasks SET completed = NOT completed WHERE id = (?)&quot;
      _, err := r.db.Exec(query, task.ID)
      if err != nil {
          return task, err
      }
  
      query = &quot;SELECT id, txt, completed FROM Tasks WHERE id = (?) RETURNING *&quot;
      err = r.db.QueryRow(query, task.ID).Scan(&amp;task.ID, &amp;task.Text, &amp;task.ListID, &amp;task.Completed)
      if err != nil {
          return task, err
      }
  
      return task, nil
  }
  </code></pre>
  <p>test:</p>
  <pre><code>const (
      ToggleTask = &quot;SELECT id, txt, completed FROM Tasks WHERE id = (?) RETURNING *&quot;
  )
  
  func TestToggleTask(t *testing.T) {
      repo := mockDbRepo()
      list := List{Name: &quot;Test List&quot;}
      repo.db.Exec(CreateList, list.Name)
  
      task := Task{Text: &quot;Test Task&quot;, ListID: list.ID}
      repo.db.Exec(CreateTask, task.Text, task.ListID)
  
      completedTask,err := repo.ToggleTask(task)
      if err != nil {
          t.Error(err)
      }
  
      if !reflect.DeepEqual(completedTask, task) {
          t.Errorf(&quot;Expected %v, got %v&quot;, task, completedTask)
      }
  }
  </code></pre>
  <p>The test returns to me:</p>
  <blockquote>
  <p>SQL logic error: near &quot;RETURNING&quot;: syntax error (1)</p>
  </blockquote>