@@ -110,7 +110,7 @@ type family BeamSqlBackendCopyFromStreamSyntax be :: Type
110110
111111-- | A built streaming-mode @COPY ... TO@ statement, ready to be executed by
112112-- 'runCopyToStream'.
113- data SqlCopyToStream be ( table :: ( Type -> Type ) -> Type ) proj
113+ data SqlCopyToStream be a
114114 = SqlCopyToStream ! (BeamSqlBackendCopyToStreamSyntax be )
115115 | -- | A projection covering zero columns. 'runCopyToStream' should treat
116116 -- this as a no-op (it must still call the sink zero times) rather
@@ -119,7 +119,7 @@ data SqlCopyToStream be (table :: (Type -> Type) -> Type) proj
119119
120120-- | A built streaming-mode @COPY ... FROM@ statement, ready to be executed
121121-- by 'runCopyFromStream'.
122- data SqlCopyFromStream be ( table :: ( Type -> Type ) -> Type ) proj
122+ data SqlCopyFromStream be a
123123 = SqlCopyFromStream ! (BeamSqlBackendCopyFromStreamSyntax be )
124124 | -- | A projection covering zero columns. 'runCopyFromStream' should
125125 -- treat this as a no-op (it should not pull from the source) rather
@@ -142,7 +142,7 @@ copyTableToStream ::
142142 (table (QField s ) -> proj ) ->
143143 -- | Backend-specific options.
144144 SqlCopyToStreamParams (BeamSqlBackendCopyToStreamSyntax be ) ->
145- SqlCopyToStream be table proj
145+ SqlCopyToStream be proj
146146copyTableToStream (DatabaseEntity dt@ (DatabaseTable {})) mkProj options =
147147 case nonEmpty (projection dt mkProj) of
148148 Nothing -> SqlCopyToStreamNoColumns
@@ -163,7 +163,7 @@ copySelectToStream ::
163163 ) =>
164164 SqlSelect be a ->
165165 SqlCopyToStreamParams (BeamSqlBackendCopyToStreamSyntax be ) ->
166- SqlCopyToStream be table proj
166+ SqlCopyToStream be a
167167copySelectToStream (SqlSelect selectSyntax) options =
168168 let source = copySelectToSyntax selectSyntax
169169 in SqlCopyToStream (copyToStreamStmt source options)
@@ -183,7 +183,7 @@ copyTableFromStream ::
183183 -- To copy the stream into the entire table, use 'id'.
184184 (table (QField s ) -> proj ) ->
185185 SqlCopyFromStreamParams (BeamSqlBackendCopyFromStreamSyntax be ) ->
186- SqlCopyFromStream be table proj
186+ SqlCopyFromStream be proj
187187copyTableFromStream (DatabaseEntity dt@ (DatabaseTable {})) mkProj options =
188188 case nonEmpty (projection dt mkProj) of
189189 Nothing -> SqlCopyFromStreamNoColumns
@@ -207,7 +207,7 @@ class (MonadBeam be m) => MonadBeamCopyToStream be m | m -> be where
207207 -- is invoked from 'IO' once per chunk emitted by the server, in order;
208208 -- 'runCopyToStream' returns once the server signals end of stream.
209209 runCopyToStream ::
210- SqlCopyToStream be table proj ->
210+ SqlCopyToStream be a ->
211211 -- | Sink. Called once for each chunk of bytes the server emits.
212212 (ByteString -> IO () ) ->
213213 m ()
@@ -256,7 +256,7 @@ class (MonadBeam be m) => MonadBeamCopyFromStream be m | m -> be where
256256 -- chunk is forwarded to the server in order. 'runCopyFromStream' returns
257257 -- once the server has acknowledged the end of stream.
258258 runCopyFromStream ::
259- SqlCopyFromStream be table proj ->
259+ SqlCopyFromStream be a ->
260260 -- | Source. Called repeatedly. 'Nothing' signals end of data.
261261 IO (Maybe ByteString ) ->
262262 m ()
0 commit comments