This commit is contained in:
voidlizard 2024-12-05 07:10:55 +03:00
parent 93d8848a72
commit 857b93a810
2 changed files with 0 additions and 24 deletions

View File

@ -736,8 +736,6 @@ export mref' r = connectedDo $ flip runContT pure do
void $ putBlock sto s
withState $ transactional do
for_ packs $ \href -> do
insertGitPack co href
insertCBlock co (HashRef root)
notice $ "cblock" <+> pretty root

View File

@ -43,15 +43,6 @@ evolveState = do
ddl [qc|
create table if not exists
gitpack
( kommit text not null
, pack text not null
, primary key (kommit,pack)
)
|]
ddl [qc|
create table if not exists
cblock
( kommit text not null primary key
, cblock text not null
@ -59,7 +50,6 @@ cblock
|]
instance ToField GitHash where
toField h = toField (show $ pretty h)
@ -78,18 +68,6 @@ instance ToField HashRef where
instance FromField HashRef where
fromField = fmap (fromString @HashRef) . fromField @String
insertGitPack :: MonadIO m => GitHash -> HashRef -> DBPipeM m ()
insertGitPack co pack = do
insert [qc|
insert into gitpack (kommit,pack) values(?,?)
on conflict (kommit,pack) do nothing
|] (co, pack)
selectGitPacks :: MonadIO m => GitHash -> DBPipeM m [HashRef]
selectGitPacks gh = do
select [qc|select pack from gitpack where kommit = ? |] (Only gh)
<&> fmap fromOnly
insertCBlock :: MonadIO m => GitHash -> HashRef -> DBPipeM m ()
insertCBlock co cblk = do
insert [qc|