mirror of https://github.com/kacos2000/Queries
Magnet AXIOM Custom Artifact
parent
4ea9da4be7
commit
aa920ec7df
@ -0,0 +1,89 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Artifacts version="2.0">
|
||||||
|
<Artifact type="SqliteArtifact" name="Google Drive Snapshot db" version="1.0" platform="Computer">
|
||||||
|
<Source type="FileName">snapshot.db</Source>
|
||||||
|
<Query>
|
||||||
|
select
|
||||||
|
mapping.doc_id as 'DocID',
|
||||||
|
case cloud_entry.doc_type
|
||||||
|
when 0 then 'Folder'
|
||||||
|
when 1 then 'File'
|
||||||
|
when 4 then 'Google Sheet'
|
||||||
|
else cloud_entry.doc_type
|
||||||
|
end as 'DocType',
|
||||||
|
cloud_entry.filename as 'CloudFilename',
|
||||||
|
cloud_entry.checksum as 'CloudMD5Hash',
|
||||||
|
cloud_entry.modified as 'CloudModified',
|
||||||
|
cloud_entry.size as 'CloudSize',
|
||||||
|
cloud_entry.original_size as 'OriginalSize',
|
||||||
|
case local_entry.is_folder
|
||||||
|
when 0 then 'No'
|
||||||
|
when 1 then 'Yes'
|
||||||
|
end as 'IsFolder',
|
||||||
|
case cloud_entry.removed
|
||||||
|
when 0 then 'No'
|
||||||
|
when 1 then 'Yes'
|
||||||
|
end as 'Removed' ,
|
||||||
|
case cloud_entry.shared
|
||||||
|
when 0 then 'No'
|
||||||
|
when 1 then 'Yes'
|
||||||
|
end as 'Shared',
|
||||||
|
local_entry.filename as 'LocalFilename',
|
||||||
|
local_entry.size as 'LocalSize',
|
||||||
|
local_entry.checksum as 'LocalMD5Hash',
|
||||||
|
local_entry.modified as 'LocalModified',
|
||||||
|
case
|
||||||
|
when local_entry.volume = volume_info.volume
|
||||||
|
then volume_info.full_path||" - "||volume_info.device_type||" - Volume Name: ("||volume_info.label||")"
|
||||||
|
else local_entry.volume
|
||||||
|
end as 'Volume',
|
||||||
|
case
|
||||||
|
when cloud_entry.checksum = local_entry.checksum
|
||||||
|
then 'MD5 Match'
|
||||||
|
else (case
|
||||||
|
when cloud_entry.checksum notnull
|
||||||
|
then 'No_Match'
|
||||||
|
else ''
|
||||||
|
end)
|
||||||
|
end as 'MD5Check',
|
||||||
|
case
|
||||||
|
when cloud_entry.modified = local_entry.modified
|
||||||
|
then 'Dates Match'
|
||||||
|
else 'No Match'
|
||||||
|
end as 'CloudLocalDatesCheck',
|
||||||
|
local_relations.child_volume as 'ChildVolume',
|
||||||
|
local_relations.parent_volume as 'ParentVolume'
|
||||||
|
|
||||||
|
from cloud_entry
|
||||||
|
join mapping on cloud_entry.doc_id = mapping.doc_id
|
||||||
|
join cloud_relations on cloud_entry.doc_id = cloud_relations.child_doc_id
|
||||||
|
join local_entry on local_entry.inode = mapping.inode
|
||||||
|
join local_relations on local_relations.child_inode = local_entry.inode
|
||||||
|
left join volume_info on volume_info.volume = local_entry.volume
|
||||||
|
order by LocalModified desc
|
||||||
|
</Query>
|
||||||
|
<Fragments>
|
||||||
|
<Fragment source="DocID" alias="DocID" datatype="String" category="None"/>
|
||||||
|
<Fragment source="DocType" alias="Doc.Type" datatype="String" category="None"/>
|
||||||
|
<Fragment source="CloudFilename" alias="Cloud Filename" datatype="String" category="None"/>
|
||||||
|
<Fragment source="CloudMD5Hash" alias="Cloud MD5 Hash" datatype="String" category="None"/>
|
||||||
|
<Fragment source="CloudModified" alias="Cloud Modified Time" datatype="datetime" category="datetime"/>
|
||||||
|
<Fragment source="CloudSize" alias="Cloud Size" datatype="Integer" category="None"/>
|
||||||
|
<Fragment source="OriginalSize" alias="Original Size" datatype="Integer" category="None"/>
|
||||||
|
<Fragment source="IsFolder" alias="Is Folder" datatype="String" category="None"/>
|
||||||
|
<Fragment source="Removed" alias="Removed" datatype="String" category="None"/>
|
||||||
|
<Fragment source="Shared" alias="Shared" datatype="String" category="None"/>
|
||||||
|
<Fragment source="LocalFilename" alias="Local Filename" datatype="string" category="None"/>
|
||||||
|
<Fragment source="LocalSize" alias="Local Size" datatype="Integer" category="None"/>
|
||||||
|
<Fragment source="LocalMD5Hash" alias="Local MD5 Hash" datatype="String" category="None"/>
|
||||||
|
<Fragment source="LocalModified" alias="Local Modified Time" datatype="datetime" category="datetime"/>
|
||||||
|
<Fragment source="Volume" alias="Volume" datatype="String" category="None"/>
|
||||||
|
<Fragment source="MD5Check" alias="Cloud/Local MD5 Check" datatype="String" category="None"/>
|
||||||
|
<Fragment source="CloudLocalDatesCheck" alias="Cloud/Local Dates Check" datatype="String" category="None"/>
|
||||||
|
<Fragment source="ChildVolume" alias="Child Volume" datatype="String" category="None"/>
|
||||||
|
<Fragment source="ParentVolume" alias="Parent Volume" datatype="String" category="None"/>
|
||||||
|
</Fragments>
|
||||||
|
</Artifact>
|
||||||
|
<Signature>
|
||||||
|
</Signature>
|
||||||
|
</Artifacts>
|
Loading…
Reference in New Issue