File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ mod shared;
2+ // mod private;
3+
4+ use crate :: primary:: Site ;
5+ use diesel:: PgConnection ;
6+ use graph:: {
7+ blockchain:: BlockPtr ,
8+ components:: store:: StoredDynamicDataSource ,
9+ prelude:: { BlockNumber , DeploymentHash , StoreError } ,
10+ } ;
11+
12+ pub fn load (
13+ conn : & PgConnection ,
14+ id : & str ,
15+ block : BlockNumber ,
16+ ) -> Result < Vec < StoredDynamicDataSource > , StoreError > {
17+ shared:: load ( conn, id, block)
18+ }
19+
20+ pub ( crate ) fn insert (
21+ conn : & PgConnection ,
22+ deployment : & DeploymentHash ,
23+ data_sources : & [ StoredDynamicDataSource ] ,
24+ block_ptr : & BlockPtr ,
25+ ) -> Result < usize , StoreError > {
26+ shared:: insert ( conn, deployment, data_sources, block_ptr)
27+ }
28+
29+ pub ( crate ) fn copy (
30+ conn : & PgConnection ,
31+ src : & Site ,
32+ dst : & Site ,
33+ target_block : & BlockPtr ,
34+ ) -> Result < usize , StoreError > {
35+ shared:: copy ( conn, src, dst, target_block)
36+ }
37+
38+ pub ( crate ) fn revert (
39+ conn : & PgConnection ,
40+ id : & DeploymentHash ,
41+ block : BlockNumber ,
42+ ) -> Result < ( ) , StoreError > {
43+ shared:: revert ( conn, id, block)
44+ }
45+
46+ pub ( crate ) fn drop ( conn : & PgConnection , id : & DeploymentHash ) -> Result < usize , StoreError > {
47+ shared:: drop ( conn, id)
48+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments