napkin-backend-sqlite-2.0.0
Safe HaskellNone
LanguageGHC2024

Napkin.Run.Sqlite

Synopsis

Documentation

execute :: (MonadNapkin Sqlite m, RenderSql a Sqlite) => BackendConn Sqlite -> a -> m () #

Executes sqlite command and returns the number of rows that were changed, inserted, or deleted by the most recent INSERT, DELETE, or UPDATE statement. see https://hackage.haskell.org/package/sqlite-simple-0.4.18.0/docs/Database-SQLite-Simple.html#v:changes

slCheckTableExists :: MonadNapkin Sqlite m => BackendConn Sqlite -> Ref Table -> m Bool #

Checks if the table or view exists.

Orphan instances

Backend Sqlite # 
Instance details

Methods

backendConnectionString :: BackendConn Sqlite -> ConnectionString #

backendExecute :: (MonadNapkin Sqlite m, RenderSql command Sqlite) => BackendConn Sqlite -> command -> m () #

backendQuery :: (MonadNapkin Sqlite m, RenderSql q Sqlite) => BackendConn Sqlite -> q -> m [Map Text Value] #

backendCheckTableExists :: MonadNapkin Sqlite m => BackendConn Sqlite -> Ref Table -> m Bool #

backendGetTableKind :: MonadNapkin Sqlite m => BackendConn Sqlite -> Ref Table -> m TableKind #

backendGetRelationSchema :: MonadNapkin Sqlite m => BackendConn Sqlite -> Ref Table -> Relation -> m [BackendSchemaField Sqlite] #

backendGetAnnotations :: MonadNapkin Sqlite m => BackendConn Sqlite -> Ref Table -> m TableAnnotations #

backendAnnotate :: MonadNapkin Sqlite m => BackendConn Sqlite -> Ref Table -> Annotation -> m () #

backendCreateAs :: (command ~ CreateRelation Sqlite, RenderSql command Sqlite, MonadNapkin Sqlite m) => BackendConn Sqlite -> command -> m () #

backendCreate :: (command ~ CreateTableSchema Sqlite, RenderSql command Sqlite, MonadNapkin Sqlite m) => BackendConn Sqlite -> command -> m () #

backendCopyTable :: (MonadNapkin Sqlite m, RenderSql DeleteRows Sqlite, RenderSql InsertInto Sqlite, RenderSql (CreateRelation Sqlite) Sqlite, Default (BackendMeta 'KindTable Sqlite)) => BackendConn Sqlite -> Ref Table -> Ref Table -> TableWriteStrategy -> m () #

backendDrop :: MonadNapkin Sqlite m => BackendConn Sqlite -> DropRelation -> m () #

backendInsertInto :: (command ~ InsertInto, RenderSql command Sqlite, MonadNapkin Sqlite m) => BackendConn Sqlite -> command -> m () #

backendRename :: MonadNapkin Sqlite m => BackendConn Sqlite -> RenameRelation -> m () #

backendListTables :: MonadNapkin Sqlite m => BackendConn Sqlite -> ListTables -> m (Set ListedTable) #

backendNormalize :: MonadNapkin Sqlite m => BackendConn Sqlite -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) #

RunBackendConn Sqlite # 
Instance details

FromField Value # 
Instance details

FromRow Text # 
Instance details

CSVImport Sqlite # 
Instance details

HasBackendSchemaField Sqlite # 
Instance details

HasBackendQueryStats Sqlite # 
Instance details

Associated Types

data BackendQueryStats Sqlite 
Instance details

Defined in Napkin.Run.Sqlite

FromJSON (DbBackendOptions Sqlite) # 
Instance details

Default (DbBackendOptions Sqlite) # 
Instance details

Generic (DbBackendOptions Sqlite) # 
Instance details

Associated Types

type Rep (DbBackendOptions Sqlite) 
Instance details

Defined in Napkin.Run.Sqlite

type Rep (DbBackendOptions Sqlite) = D1 ('MetaData "DbBackendOptions" "Napkin.Run.Sqlite" "napkin-backend-sqlite-2.0.0-5tDB3kLlbnRYjGKat6306" 'False) (C1 ('MetaCons "SqliteOptions" 'PrefixI 'False) (U1 :: Type -> Type))
Show (DbBackendOptions Sqlite) # 
Instance details

Eq (DbBackendOptions Sqlite) # 
Instance details

FromJSON (BackendQueryStats Sqlite) # 
Instance details

ToJSON (BackendQueryStats Sqlite) # 
Instance details

Monoid (BackendQueryStats Sqlite) # 
Instance details

Semigroup (BackendQueryStats Sqlite) # 
Instance details

Generic (BackendQueryStats Sqlite) # 
Instance details

Associated Types

type Rep (BackendQueryStats Sqlite) 
Instance details

Defined in Napkin.Run.Sqlite

type Rep (BackendQueryStats Sqlite) = D1 ('MetaData "BackendQueryStats" "Napkin.Run.Sqlite" "napkin-backend-sqlite-2.0.0-5tDB3kLlbnRYjGKat6306" 'False) (C1 ('MetaCons "BackendQueryStats" 'PrefixI 'False) (U1 :: Type -> Type))
Show (BackendSchemaField Sqlite) # 
Instance details

Show (BackendQueryStats Sqlite) # 
Instance details

Eq (BackendSchemaField Sqlite) # 
Instance details

Eq (BackendQueryStats Sqlite) # 
Instance details

FromRow (BackendSchemaField Sqlite) # 
Instance details