Minor version bump, slew of minor fixes and documentation to get this used

This commit is contained in:
2020-11-09 12:50:44 +00:00
parent f0e47fb9eb
commit 7eaf3fd84c
9 changed files with 44 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
Package: rmodb Package: rmodb
Title: Metadata-Object pair database Title: Metadata-Object pair database
Version: 0.0.1 Version: 0.1.0
Author: Craig Williams [aut, cre] Author: Craig Williams [aut, cre]
Maintainer: Craig Williams <craig@avsdev.uk> Maintainer: Craig Williams <craig@avsdev.uk>
Description: RMODB implements a metadata-object database for storing R Description: RMODB implements a metadata-object database for storing R
@@ -18,7 +18,7 @@ Encoding: UTF-8
NeedsCompilation: yes NeedsCompilation: yes
LazyData: true LazyData: true
Roxygen: list(markdown = TRUE) Roxygen: list(markdown = TRUE)
RoxygenNote: 7.0.2 RoxygenNote: 7.1.1
Suggests: Suggests:
testthat testthat
SystemRequirements: libmariadb-client-dev | libmariadb-client-lgpl-dev | libmysqlclient-dev (deb) SystemRequirements: libmariadb-client-dev | libmariadb-client-lgpl-dev | libmysqlclient-dev (deb)

View File

@@ -4,6 +4,7 @@ export(TYPE_BLOB)
export(TYPE_BOOL) export(TYPE_BOOL)
export(TYPE_DOUBLE) export(TYPE_DOUBLE)
export(TYPE_FLOAT) export(TYPE_FLOAT)
export(TYPE_ID)
export(TYPE_INT16) export(TYPE_INT16)
export(TYPE_INT32) export(TYPE_INT32)
export(TYPE_INT64) export(TYPE_INT64)
@@ -15,6 +16,23 @@ export(TYPE_UINT16)
export(TYPE_UINT32) export(TYPE_UINT32)
export(TYPE_UINT64) export(TYPE_UINT64)
export(TYPE_UINT8) export(TYPE_UINT8)
export(group)
export(group_create)
export(group_delete)
export(group_exists)
export(group_id)
export(groups)
export(link_user_group)
export(metadata)
export(metadata_query)
export(metadatas)
export(metaobject)
export(metaobject_create)
export(metaobject_delete)
export(metaobject_ids)
export(metaobject_query)
export(metaobject_update)
export(metaobjects)
export(modb_conn_ref) export(modb_conn_ref)
export(modb_connect) export(modb_connect)
export(modb_connectionExists) export(modb_connectionExists)
@@ -26,4 +44,14 @@ export(modb_destroy)
export(modb_disconnect) export(modb_disconnect)
export(modb_exists) export(modb_exists)
export(modb_use) export(modb_use)
export(object)
export(object_query)
export(objects)
export(unlink_user_group)
export(user)
export(user_create)
export(user_delete)
export(user_exists)
export(user_id)
export(users)
useDynLib(rmodb, .registration = TRUE, .fixes = "c_") useDynLib(rmodb, .registration = TRUE, .fixes = "c_")

View File

@@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Manage.R % Please edit documentation in R/Database.R
\name{modb_conn_ref} \name{modb_conn_ref}
\alias{modb_conn_ref} \alias{modb_conn_ref}
\title{MODB Connection References} \title{MODB Connection References}

View File

@@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Manage.R % Please edit documentation in R/Database.R
\name{modb_connect} \name{modb_connect}
\alias{modb_connect} \alias{modb_connect}
\title{MODB Connections} \title{MODB Connections}

View File

@@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Manage.R % Please edit documentation in R/Database.R
\name{modb_connectionInfo} \name{modb_connectionInfo}
\alias{modb_connectionInfo} \alias{modb_connectionInfo}
\alias{modb_connectionExists} \alias{modb_connectionExists}

View File

@@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Manage.R % Please edit documentation in R/Database.R
\name{modb_disconnect} \name{modb_disconnect}
\alias{modb_disconnect} \alias{modb_disconnect}
\title{MODB Connections} \title{MODB Connections}

View File

@@ -1,10 +1,12 @@
PKG_CPPFLAGS=@cflags@ PKG_CPPFLAGS=@cflags@ -DDEBUG -DSQL_DEBUG_MAX_LEN=2048
PKG_LIBS=@libs@ PKG_LIBS=@libs@
all: clean all: clean
clean: clean:
rm -f $(SHLIB) $(OBJECTS) rm -f $(SHLIB) $(OBJECTS)
#OBJECTS = $(patsubst %.c,%.o,$(wildcard *.c))
OBJECTS = $(DB_OBJECTS) $(MODB_OBJECTS) $(R_OBJECTS) strext.o OBJECTS = $(DB_OBJECTS) $(MODB_OBJECTS) $(R_OBJECTS) strext.o
DB_OBJECTS = $(patsubst %.c,%.o,$(wildcard db_*.c)) DB_OBJECTS = $(patsubst %.c,%.o,$(wildcard db_*.c))
MODB_OBJECTS = $(patsubst %.c,%.o,$(wildcard modb_*.c)) MODB_OBJECTS = $(patsubst %.c,%.o,$(wildcard modb_*.c))

View File

@@ -70,7 +70,7 @@ void db_value_sbva(str_builder *sb, e_column_type type, uint32_t n_args, va_list
} }
if (type == TYPE_TIMESTAMP) { if (type == TYPE_TIMESTAMP) {
if (db_timestampString(va_arg(args, unsigned int), &tmp_str, &tmp_len) == 0) { if (db_timestampString(va_arg(args, int64_t), &tmp_str, &tmp_len) != 0) {
strbld_str(sb, tmp_str, tmp_len); strbld_str(sb, tmp_str, tmp_len);
free(tmp_str); free(tmp_str);
} }

View File

@@ -18,6 +18,8 @@ static const R_CallMethodDef callMethods[] = {
{"rmodb_use", (DL_FUNC) &rmodb_use, 3}, {"rmodb_use", (DL_FUNC) &rmodb_use, 3},
{"rmodb_getLastQuery", (DL_FUNC) &rmodb_getLastQuery, 1},
{"rmodb_groupId", (DL_FUNC) &rmodb_groupId, 2}, {"rmodb_groupId", (DL_FUNC) &rmodb_groupId, 2},
@@ -41,7 +43,9 @@ static const R_CallMethodDef callMethods[] = {
{"rmodb_userRemoveGroup", (DL_FUNC) &rmodb_userRemoveGroup, 3}, {"rmodb_userRemoveGroup", (DL_FUNC) &rmodb_userRemoveGroup, 3},
{"rmodb_metaobjectId", (DL_FUNC) &rmodb_metaobjectId, 2}, {"rmodb_metaobjectIds", (DL_FUNC) &rmodb_metaobjectIds, 3},
{"rmodb_metaobjectQuery", (DL_FUNC) &rmodb_metaobjectQuery, 4},
{"rmodb_metadataQuery", (DL_FUNC) &rmodb_metadataQuery, 4},
{"rmodb_metaobject", (DL_FUNC) &rmodb_metaobject, 2}, {"rmodb_metaobject", (DL_FUNC) &rmodb_metaobject, 2},
{"rmodb_metadata", (DL_FUNC) &rmodb_metadata, 2}, {"rmodb_metadata", (DL_FUNC) &rmodb_metadata, 2},
@@ -51,7 +55,7 @@ static const R_CallMethodDef callMethods[] = {
{"rmodb_metadatas", (DL_FUNC) &rmodb_metadatas, 2}, {"rmodb_metadatas", (DL_FUNC) &rmodb_metadatas, 2},
{"rmodb_createMetaobject", (DL_FUNC) &rmodb_createMetaobject, 5}, {"rmodb_createMetaobject", (DL_FUNC) &rmodb_createMetaobject, 5},
{"rmodb_updateMetaobject", (DL_FUNC) &rmodb_updateMetaobject, 3}, {"rmodb_updateMetaobject", (DL_FUNC) &rmodb_updateMetaobject, 5},
{"rmodb_deleteMetaobject", (DL_FUNC) &rmodb_deleteMetaobject, 2}, {"rmodb_deleteMetaobject", (DL_FUNC) &rmodb_deleteMetaobject, 2},