pyLodStorage 0.0.77__tar.gz → 0.0.78__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {pylodstorage-0.0.77/pylodstorage.egg-info → pylodstorage-0.0.78}/PKG-INFO +1 -1
  2. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/sql.py +7 -5
  3. {pylodstorage-0.0.77 → pylodstorage-0.0.78/pylodstorage.egg-info}/PKG-INFO +1 -1
  4. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/setup.py +1 -1
  5. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/LICENSE +0 -0
  6. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/README.md +0 -0
  7. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/__init__.py +0 -0
  8. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/csv.py +0 -0
  9. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/entity.py +0 -0
  10. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/jsonable.py +0 -0
  11. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/jsonpicklemixin.py +0 -0
  12. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/lod.py +0 -0
  13. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/mwTable.py +0 -0
  14. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/plot.py +0 -0
  15. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/query.py +0 -0
  16. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/sample.py +0 -0
  17. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/schema.py +0 -0
  18. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/sparql.py +0 -0
  19. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/storageconfig.py +0 -0
  20. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/tabulateCounter.py +0 -0
  21. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/uml.py +0 -0
  22. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/lodstorage/yamlablemixin.py +0 -0
  23. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/pylodstorage.egg-info/SOURCES.txt +0 -0
  24. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/pylodstorage.egg-info/dependency_links.txt +0 -0
  25. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/pylodstorage.egg-info/requires.txt +0 -0
  26. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/pylodstorage.egg-info/top_level.txt +0 -0
  27. {pylodstorage-0.0.77 → pylodstorage-0.0.78}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pylodstorage
3
- Version: 0.0.77
3
+ Version: 0.0.78
4
4
  Summary: python List of Dict (Table) Storage library
5
5
  Home-page: https://github.com/WolfgangFahl/pyLodStorage
6
6
  Author: Wolfgang Fahl
@@ -56,7 +56,7 @@ class SQLDB(object):
56
56
  '''
57
57
  self.c.execute(ddlCmd)
58
58
 
59
- def createTable(self,listOfRecords,entityName,primaryKey=None,withDrop=False,sampleRecordCount=1,failIfTooFew=True):
59
+ def createTable(self,listOfRecords,entityName:str,primaryKey:str=None,withCreate:bool=True,withDrop:bool=False,sampleRecordCount=1,failIfTooFew=True):
60
60
  '''
61
61
  derive Data Definition Language CREATE TABLE command from list of Records by examining first recorda
62
62
  as defining sample record and execute DDL command
@@ -68,6 +68,7 @@ class SQLDB(object):
68
68
  entityName(string): the entity / table name to use
69
69
  primaryKey(string): the key/column to use as a primary key
70
70
  withDrop(boolean): true if the existing Table should be dropped
71
+ withCreate(boolean): true if the create Table command should be executed - false if only the entityInfo should be returned
71
72
  sampleRecords(int): number of sampleRecords expected and to be inspected
72
73
  failIfTooFew(boolean): raise an Exception if to few sampleRecords else warn only
73
74
  Returns:
@@ -87,10 +88,11 @@ class SQLDB(object):
87
88
  entityInfo=EntityInfo(sampleRecords,entityName,primaryKey,debug=self.debug)
88
89
  if withDrop:
89
90
  self.c.execute(entityInfo.dropTableCmd)
90
- try:
91
- self.c.execute(entityInfo.createTableCmd)
92
- except sqlite3.OperationalError as oe:
93
- raise Exception(f"createTable failed with error {oe} for {entityInfo.createTableCmd}")
91
+ if withCreate:
92
+ try:
93
+ self.c.execute(entityInfo.createTableCmd)
94
+ except sqlite3.OperationalError as oe:
95
+ raise Exception(f"createTable failed with error {oe} for {entityInfo.createTableCmd}")
94
96
  return entityInfo
95
97
 
96
98
  def getDebugInfo(self,record,index,executeMany):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pylodstorage
3
- Version: 0.0.77
3
+ Version: 0.0.78
4
4
  Summary: python List of Dict (Table) Storage library
5
5
  Home-page: https://github.com/WolfgangFahl/pyLodStorage
6
6
  Author: Wolfgang Fahl
@@ -11,7 +11,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
11
11
 
12
12
  setup(
13
13
  name='pylodstorage',
14
- version='0.0.77',
14
+ version='0.0.78',
15
15
 
16
16
  packages=['lodstorage',],
17
17
  author='Wolfgang Fahl',
File without changes
File without changes
File without changes