Changeset: 9e97ff5d1439 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9e97ff5d1439 Added Files: sql/backends/monet5/sql_hitchhiker.c sql/backends/monet5/sql_hitchhiker.h Modified Files: sql/backends/monet5/Makefile.ag sql/backends/monet5/sql.mal Branch: hitchhiker Log Message:
Added module hitchhiker (hh) in SQL layer diffs (109 lines): diff --git a/sql/backends/monet5/Makefile.ag b/sql/backends/monet5/Makefile.ag --- a/sql/backends/monet5/Makefile.ag +++ b/sql/backends/monet5/Makefile.ag @@ -46,6 +46,7 @@ lib__sql = { sql_round.c sql_round_impl.h sql_bat2time.c \ sql_fround.c sql_fround_impl.h \ sql_orderidx.c sql_orderidx.h \ + sql_hitchhiker.c sql_hitchhiker.h \ wlr.c wlr.h \ sql_datetrunc.c \ sql_rank.c sql_rank.h sql_subquery.c sql_subquery.h diff --git a/sql/backends/monet5/sql.mal b/sql/backends/monet5/sql.mal --- a/sql/backends/monet5/sql.mal +++ b/sql/backends/monet5/sql.mal @@ -6,6 +6,7 @@ module batsql; module sql; +module hh; pattern shutdown(delay:bte, force:bit):str address SQLshutdown_wrap; @@ -208,6 +209,34 @@ comment "Bind the 'schema.table.index' B 1 - inserts 2 - updates"; +pattern hh.bind(mvc:int, schema:str, table:str, column:str, access:int ):bat[:any_1] +address sql_hitchhiker +comment "Bind the 'schema.table.column' BAT with access kind: + 0 - base table + 1 - inserts + 2 - updates"; + +pattern hh.bind(mvc:int, schema:str, table:str, column:str, access:int )(uid:bat[:oid],uval:bat[:any_1]) +address sql_hitchhiker +comment "Bind the 'schema.table.column' BAT with access kind: + 0 - base table + 1 - inserts + 2 - updates"; + +pattern hh.bind(mvc:int, schema:str, table:str, column:str, access:int, part_nr:int, nr_parts:int ):bat[:any_1] +address sql_hitchhiker +comment "Bind the 'schema.table.column' BAT partition with access kind: + 0 - base table + 1 - inserts + 2 - updates"; + +pattern hh.bind(mvc:int, schema:str, table:str, column:str, access:int, part_nr:int, nr_parts:int )(uid:bat[:oid],uval:bat[:any_1]) +address sql_hitchhiker +comment "Bind the 'schema.table.column' BAT with access kind: + 0 - base table + 1 - inserts + 2 - updates"; + pattern emptybind(mvc:int, schema:str, table:str, column:str, access:int ):bat[:any_1] address mvc_bind_wrap; pattern bind(mvc:int, schema:str, table:str, column:str, access:int ):bat[:any_1] diff --git a/sql/backends/monet5/sql_hitchhiker.c b/sql/backends/monet5/sql_hitchhiker.c new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/sql_hitchhiker.c @@ -0,0 +1,16 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V. + */ + +#include "monetdb_config.h" +#include "sql_hitchhiker.h" + +str +sql_hitchhiker(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) +{ + return mvc_bind_wrap(cntxt, mb, stk, pci); +} diff --git a/sql/backends/monet5/sql_hitchhiker.h b/sql/backends/monet5/sql_hitchhiker.h new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/sql_hitchhiker.h @@ -0,0 +1,26 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V. + */ + +#ifndef _SQL_HITCHHIKER_ +#define _SQL_HITCHHIKER_ + +#include "sql.h" + +#ifdef WIN32 +#ifndef LIBSQL +#define sql5_export extern __declspec(dllimport) +#else +#define sql5_export extern __declspec(dllexport) +#endif +#else +#define sql5_export extern +#endif + +sql5_export str sql_hitchhiker(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); + +#endif /* _SQL_HITCHHIKER_ */ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list