Hi Jason,
sorry for yesterday, but I was busy and did not want to dig deeper into it.
I still can only guess what you need, and can't test it, but here are some fixes
which should show how I understand what you want to do:
(class +APK +Entity)
# APK POC Package Database Class
(rel apk (+Ref +String)) # APK Path
(rel app (+IdxFold +String)) # APK Package
(rel aid (+Key +String)) # APK Application ID
(rel ino (+Key +Number)) # FS Inode of APK on SharePoint
filesystem (UUID)
(rel flv (+Ref +String)) # APK Build Flavor
(rel bty (+String)) # APK Build Type
(rel vrn (+Ref +Number)) # APK VersionCode
(rel vrs (+Ref +String)) # APK VersionName
(rel gin (+String)) # APK GIT Info String
(rel dbg (+Ref +Bool)) # APK has Debug Logging enabled
(rel blt (+Ref +Bag) NIL # APK BuildTime
((+Date)) # Date
((+Time)) ) # Time
(rel bls (+String)) # APK BuildTimeString
(rel ctm (+Ref +Bag) NIL # APK Creation Time
((+Date)) # Date
((+Time)) ) # Time
(rel mtm (+Ref +Bag) NIL # APK Modification Time
((+Date)) # Date
((+Time)) ) # Time
(rel AB> (*Ref +Number)) # APK MinSdkVersion (Android ABI #)
(rel AB< (*Ref +Number)) # APK MaxSdkVersion (Android ABI #)
(rel AB@ (*Ref +Number)) # APK TargetSdkVersion (Android ABI #)
(rel AB$ (*Ref +Number)) # APK CompileSdkVersion (Android ABI #)
(de apks (Flv Ver Blt Abi Mtm)
(unless
(and
(str? Flv)
(num? Ver)
(num? Blt)
(num? Abi) )
(quit # You may 'throw' here, but it needs a tag
(pack
"apks: Invalid Parameters: flv:" Flv
" vrn:" Ver
" Mtm:" Mtm
" Abi:" Abi ) ) )
(symbols '(APK pico)
(solve
(quote
@FLV Flv # have a given 'flv' (flavor) attribute == Flv
@VER (cons Ver T) # have a version >= Ver
@BLT (cons Blt T) # have a build time >= Blt
@AB> (cons NIL Abi) # have a min api # <= Abi
@AB< (cons Abi T) # have a max api # >= Abi
@MTM (and Mtm (cons @ T)) # have a modification time >= Mtm
(select (@APK)
((flv +APK @FLV)
(vrn +APK @VER)
(blt +APK @BLT)
(AB> +APK @AB>)
(AB< +APK @AB<) )
(same @FLV @APK flv)
(range @VER @APK vrn)
(range @BLT @APK blt)
(range @AB> @APK AB>)
(range @AB< @APK AB<)
(range @MTM @APK mtm) ) )
@APK ) ) )
> (de apk_str (a)
> (mapcar
> '((c)
> (pack (cdr c) " : " (car c))
> )
> (getl a)
> )
> )
Just to make sure: Please don't forget to change (namings!) to something like
(de apk_str (A)
(mapcar
'((C) (pack (cdr C) " : " (car C)))
(getl A) ) )
> (de show_apks (apks)
> (prog
> (let
> (s "")
> (prog
> (for a apks
> (setq s
> (join "^I" (apk_str a))
> )
> )
> )
> )
> s
> )
> )
The 'prog's are not needed for the 'let' or 'for'
(de show_apks (Apks)
(let S ""
(for A Apks
(setq S (join "^I" (apk_str A))) )
S ) )
> I guess picoLisp's DB is kind of a work-in-progress / unfinished idea ?
Nope. It is used in many projects since more than 20 years. Very stable.
☺/ A!ex
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe