Cython API to import a column and a view from a DMS to another DMS
This commit is contained in:
@ -8,8 +8,10 @@ __OBIDMS_COLUMN_CLASS__ = {}
|
||||
|
||||
from ..capi.obitypes cimport name_data_type, \
|
||||
obitype_t, \
|
||||
OBI_BOOL
|
||||
obiversion_t
|
||||
|
||||
from ..capi.obidms cimport obi_import_column
|
||||
|
||||
from ..capi.obidmscolumn cimport OBIDMS_column_header_p, \
|
||||
obi_close_column, \
|
||||
obi_get_elements_names
|
||||
@ -59,6 +61,15 @@ cdef class Column(OBIWrapper) :
|
||||
return __OBIDMS_COLUMN_CLASS__[(obitype, multi_elts)][1]
|
||||
|
||||
|
||||
@staticmethod
|
||||
def import_column(object dms_1, object dms_2, object column_name, obiversion_t version_number):
|
||||
cdef obiversion_t new_version
|
||||
new_version = obi_import_column(tobytes(dms_1), tobytes(dms_2), tobytes(column_name), version_number)
|
||||
if new_version < 0 :
|
||||
raise Exception("Error importing a column")
|
||||
return new_version
|
||||
|
||||
|
||||
@staticmethod
|
||||
def new_column(View view,
|
||||
object column_name,
|
||||
|
Reference in New Issue
Block a user