File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 34
34
import numpy as np
35
35
import pandas as pd
36
36
import six
37
+ from .utils .datetime import sas2python_datetime
37
38
from .utils .params import ParamManager , ActionParamManager
38
39
from .utils .misc import super_dir
39
40
from ..config import get_option
@@ -2381,6 +2382,28 @@ def next(self):
2381
2382
''' Return next item in the iteration '''
2382
2383
return StopIteration
2383
2384
2385
+ def exists (self ):
2386
+ ''' Return True if table exists in the server '''
2387
+ return self ._retrieve ('table.tableexists' )['exists' ] > 0
2388
+
2389
+ @getattr_safe_property
2390
+ def last_modified_date (self ):
2391
+ ''' Return the last modified date of the table in the server '''
2392
+ modtime = self ._retrieve ('table.tableinfo' )['TableInfo' ]['ModTime' ][0 ]
2393
+ return sas2python_datetime (modtime )
2394
+
2395
+ @getattr_safe_property
2396
+ def last_accessed_date (self ):
2397
+ ''' Return the last access date of the table in the server '''
2398
+ acctime = self ._retrieve ('table.tableinfo' )['TableInfo' ]['AccessTime' ][0 ]
2399
+ return sas2python_datetime (acctime )
2400
+
2401
+ @getattr_safe_property
2402
+ def created_date (self ):
2403
+ ''' Return the created date of the table in the server '''
2404
+ cretime = self ._retrieve ('table.tableinfo' )['TableInfo' ]['CreateTime' ][0 ]
2405
+ return sas2python_datetime (cretime )
2406
+
2384
2407
@getattr_safe_property
2385
2408
def _numcolumns (self ):
2386
2409
''' Return number of visible columns '''
You can’t perform that action at this time.
0 commit comments