ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = libdbtransformer.pc.in
+EXTRA_DIST = libzakdbt.pc.in
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libdbtransformer.pc
+pkgconfig_DATA = libzakdbt.pc
distclean-local:
if test "$(srcdir)" = "."; then :; else \
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.65)
-AC_INIT([libdbtransformers], [0.0.1], [azagli@libero.it])
+AC_INIT([libzakdbt], [0.0.1], [azagli@libero.it])
AC_CONFIG_SRCDIR([src/dbtransformer.c])
AC_CONFIG_HEADER([config.h])
# Checks for library functions.
AC_CONFIG_FILES([
- libdbtransformer.pc
+ libzakdbt.pc
Makefile
src/Makefile
tests/Makefile
+++ /dev/null
-<!ELEMENT dbtransformer (dbtransformation+)>
-
-<!ELEMENT dbtransformation (comment?,
- gda_op*,
- sql*,
- drop_table*,
- rename_table*,
- drop_view*,
- rename_view*,
- create_index*,
- drop_index*)>
-
-<!ATTLIST dbtransformation
- id CDATA #REQUIRED
->
-
-<!ELEMENT comment (#PCDATA)>
-
-<!ELEMENT gda_op (#PCDATA)>
-
-<!ELEMENT sql (#PCDATA)>
-
-<!ELEMENT drop_table (table_name)>
-
-<!ELEMENT rename_table (table_name, new_table_name)>
-
-<!ELEMENT table_name (#PCDATA)>
-
-<!ELEMENT new_table_name (#PCDATA)>
-
-<!ELEMENT drop_view (view_name)>
-
-<!ELEMENT rename_view (view_name, new_view_name)>
-
-<!ELEMENT view_name (#PCDATA)>
-
-<!ELEMENT new_view_name (#PCDATA)>
-
-<!ELEMENT create_index (index_name, table_name, column_name+)>
-
-<!ELEMENT column_name (#PCDATA)>
-
-<!ELEMENT drop_index (index_name)>
# of using the various options.
# The name of the module, e.g. 'glib'.
-DOC_MODULE=dbtransformer
+DOC_MODULE=zakdbt
# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
#DOC_MODULE_VERSION=2
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=-I$(top_srcdir)/src $(DBT_CFLAGS)
-GTKDOC_LIBS=$(top_builddir)/src/libdbtransformer.la $(DBT_LIBS)
+GTKDOC_LIBS=$(top_builddir)/src/libzakdbt.la $(DBT_LIBS)
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make
--- /dev/null
+<!ELEMENT dbtransformer (dbtransformation+)>
+
+<!ELEMENT dbtransformation (comment?,
+ gda_op*,
+ sql*,
+ drop_table*,
+ rename_table*,
+ drop_view*,
+ rename_view*,
+ create_index*,
+ drop_index*)>
+
+<!ATTLIST dbtransformation
+ id CDATA #REQUIRED
+>
+
+<!ELEMENT comment (#PCDATA)>
+
+<!ELEMENT gda_op (#PCDATA)>
+
+<!ELEMENT sql (#PCDATA)>
+
+<!ELEMENT drop_table (table_name)>
+
+<!ELEMENT rename_table (table_name, new_table_name)>
+
+<!ELEMENT table_name (#PCDATA)>
+
+<!ELEMENT new_table_name (#PCDATA)>
+
+<!ELEMENT drop_view (view_name)>
+
+<!ELEMENT rename_view (view_name, new_view_name)>
+
+<!ELEMENT view_name (#PCDATA)>
+
+<!ELEMENT new_view_name (#PCDATA)>
+
+<!ELEMENT create_index (index_name, table_name, column_name+)>
+
+<!ELEMENT column_name (#PCDATA)>
+
+<!ELEMENT drop_index (index_name)>
+++ /dev/null
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: @PACKAGE_NAME@
-Description: Class to manage authorizations.
-Version: @PACKAGE_VERSION@
-Requires: glib-2.0
-Libs: -L${libdir} -lautoz
-Cflags: -I${includedir}
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: Class to manage db changes.
+Version: @PACKAGE_VERSION@
+Requires: libgda-5.0 libxslt
+Libs: -L${libdir} -lzakdbt
+Cflags: -I${includedir}
AM_CPPFLAGS = $(DBT_CFLAGS)
-lib_LTLIBRARIES = libdbtransformer.la
+lib_LTLIBRARIES = libzakdbt.la
-libdbtransformer_la_SOURCES = dbtransformer.c
+libzakdbt_la_SOURCES = dbtransformer.c
-libdbtransformer_la_LDFLAGS = -no-undefined
+libzakdbt_la_LDFLAGS = -no-undefined
-libdbtransformer_include_HEADERS = libdbtransformer.h
+libzakdbt_include_HEADERS = libzakdbt.h
-libdbtransformer_includedir = $(includedir)
+libzakdbt_includedir = $(includedir)/$(PACKAGE)
/*
- * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2010-2018 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include <sql-parser/gda-sql-parser.h>
-#include "libdbtransformer.h"
+#include "libzakdbt.h"
static gchar *str_xslt_doc =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
filen = g_strstrip (g_strdup (filename));
- g_return_if_fail (g_strcmp0 (filen, "") != 0);
+ g_return_if_fail (g_strcmp0 (filen, "") != 0);
/* TODO validate against DTD */
{
return ret;
}
-
+
/* table doesn't exist */
GdaServerOperation *op;
gint i;
/* Set parameter's values */
/* table name */
gda_server_operation_set_value_at (op, "dbt_transformations", &error, "/TABLE_DEF_P/TABLE_NAME");
-
+
/* "id" field */
i = 0;
gda_server_operation_set_value_at (op, "id", &error, "/FIELDS_A/@COLUMN_NAME/%d", i);
error != NULL && error->message != NULL ? error->message : "no detail");
return ret;
}
- g_object_unref (op);
+ g_object_unref (op);
}
}
error != NULL && error->message != NULL ? error->message : "No detail");
ret = FALSE;
}
- g_object_unref (op);
+ g_object_unref (op);
}
else
{
error != NULL && error->message != NULL ? error->message : "no detail");
ret = FALSE;
}
- g_object_unref (op);
+ g_object_unref (op);
}
else
{
error != NULL && error->message != NULL ? error->message : "No detail");
ret = FALSE;
}
- g_object_unref (op);
+ g_object_unref (op);
}
else
{
+++ /dev/null
-/*
- * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __LIBDBT_H__
-#define __LIBDBT_H__
-
-#include <glib.h>
-#include <glib-object.h>
-#include <libgda/libgda.h>
-
-
-G_BEGIN_DECLS
-
-
-#define TYPE_DBT (dbt_get_type ())
-#define DBT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DBT, Dbt))
-#define DBT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DBT, DbtClass))
-#define IS_DBT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DBT))
-#define IS_DBT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DBT))
-#define DBT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DBT, DbtClass))
-
-
-typedef struct _Dbt Dbt;
-typedef struct _DbtClass DbtClass;
-
-struct _Dbt
- {
- GObject parent;
- };
-
-struct _DbtClass
- {
- GObjectClass parent_class;
- };
-
-GType dbt_get_type (void) G_GNUC_CONST;
-
-
-Dbt *dbt_new (void);
-
-void dbt_set_db_connection (Dbt *dbt, GdaConnection *gda_conn);
-void dbt_set_db_connection_from_string (Dbt *dbt, const gchar *cnc_string);
-
-void dbt_set_xml (Dbt *dbt, xmlNodePtr xml_root);
-void dbt_set_xml_from_filename (Dbt *dbt, const gchar *filename);
-
-gboolean dbt_db_is_updated (Dbt *dbt);
-
-void dbt_transform (Dbt *dbt);
-
-
-G_END_DECLS
-
-
-#endif /* __LIBDBT_H__ */
--- /dev/null
+/*
+ * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __LIBDBT_H__
+#define __LIBDBT_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <libgda/libgda.h>
+
+
+G_BEGIN_DECLS
+
+
+#define TYPE_DBT (dbt_get_type ())
+#define DBT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DBT, Dbt))
+#define DBT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DBT, DbtClass))
+#define IS_DBT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DBT))
+#define IS_DBT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DBT))
+#define DBT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DBT, DbtClass))
+
+
+typedef struct _Dbt Dbt;
+typedef struct _DbtClass DbtClass;
+
+struct _Dbt
+ {
+ GObject parent;
+ };
+
+struct _DbtClass
+ {
+ GObjectClass parent_class;
+ };
+
+GType dbt_get_type (void) G_GNUC_CONST;
+
+
+Dbt *dbt_new (void);
+
+void dbt_set_db_connection (Dbt *dbt, GdaConnection *gda_conn);
+void dbt_set_db_connection_from_string (Dbt *dbt, const gchar *cnc_string);
+
+void dbt_set_xml (Dbt *dbt, xmlNodePtr xml_root);
+void dbt_set_xml_from_filename (Dbt *dbt, const gchar *filename);
+
+gboolean dbt_db_is_updated (Dbt *dbt);
+
+void dbt_transform (Dbt *dbt);
+
+
+G_END_DECLS
+
+
+#endif /* __LIBDBT_H__ */
noinst_PROGRAMS = test
-LDADD = $(top_builddir)/src/libdbtransformer.la
+LDADD = $(top_builddir)/src/libzakdbt.la
-EXTRA_DIST =
+EXTRA_DIST =
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "libdbtransformer.h"
+#include "libzakdbt.h"
Dbt *dbt;