TomMalkin / SimQLe

The simplest way to use SQL in Python
MIT License
30 stars 5 forks source link

add the sdatum method to RecordScalar #83

Closed TomMalkin closed 4 years ago

TomMalkin commented 4 years ago

the sdatum method stands for Safe Datum, and has a default value option that is returned only if the record doesn't exist.

for example, given result.sdatum(1) would return:

data = 2, then 2 data = 0, then 0 data = None, then None data doesn't exist, then 1

Which is different to the .datum property, which if the data doesn't exist, then throws an error.

codecov-commenter commented 4 years ago

Codecov Report

Merging #83 into dev will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               dev       #83   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          277       281    +4     
=========================================
+ Hits           277       281    +4     
Impacted Files Coverage Δ
simqle/recordset/recordset.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 12def8d...82ae047. Read the comment docs.