     @create = (data = '', cb) -> # callback and data are both optional.
       [data, cb] = ['', data] if typeof data is 'function'
 
-      @collection.submit @doc, {v:0, create:{type:'text', data}}, (err) ->
+      type = if typeof data is 'string' then 'text' else 'json0'
+      @collection.submit @doc, {v:0, create:{type, data}}, (err) ->
         throw new Error err if err
         cb?()
 

        results.on 'remove', -> throw new Error 'remove called after destroy'

        results.destroy()
        setTimeout (-> done()), 10

        # Sooo tasty. results... you know you want this delicious document.
        @create {x:5}, =>
          op = op:'rm', p:[]
          @collection.submit @doc, v:1, op:op




    it.skip 'Updated documents have updated result data if follow:true', (done) ->



          tryRead()

  describe 'Query', ->
    it 'returns a result it already applies to', (done) -> @create {x:5}, =>
      @collection.query {x:5}, (err, results) =>
        expected = {}
        expected[@doc] = {data:{x:5}, v:1}
        assert.deepEqual results.data, expected
        results.destroy()
        done()
