Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@@IDENTITY like extension for MonetDB #2483

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

@@IDENTITY like extension for MonetDB #2483

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request GDK Kernel invalid This doesn't seem right

Comments

@monetdb-team
Copy link

Date: 2009-03-07 07:21:21 +0100
From: @skinkie
To: @njnes
Version: -- development

Last updated: 2009-03-12 10:19:18 +0100

Comment 13761

Date: 2009-03-07 19:21:21 +0100
From: @skinkie

This implements 'in SQL' access to the last_id.

Index: src/backends/monet5/sql.mx

RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.319.2.1
diff -u -r1.319.2.1 sql.mx
--- src/backends/monet5/sql.mx 15 Feb 2009 10:44:34 -0000 1.319.2.1
+++ src/backends/monet5/sql.mx 7 Mar 2009 18:19:37 -0000
@@ -1330,6 +1330,7 @@

             if (seq && seq_next_value(seq, res)) {
                     m->last_id = *res;
  •                   stack_set_number(m, "last_id", m->last_id); /* MSSQL defined extension @@IDENTITY */
                      return MAL_SUCCEED;
              }
      }
    

Index: src/backends/monet5/sql_scenario.mx

RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.334.2.2
diff -u -r1.334.2.2 sql_scenario.mx
--- src/backends/monet5/sql_scenario.mx 27 Feb 2009 19:26:08 -0000 1.334.2.2
+++ src/backends/monet5/sql_scenario.mx 7 Mar 2009 18:19:38 -0000
@@ -273,7 +273,7 @@
sql_subtype ctype;
char *typename;
stmt *r = NULL;

  •   lng sec = 0;
    
  •   lng sec = 0, last_id = -1;
      bit T = TRUE;
      bit F = FALSE;
      ValRecord src;
    

@@ -281,6 +281,7 @@
typename = "int";
sql_find_subtype(&ctype, typename, 0, 0);
SQLglobal("debug", &sql->debug);

  •   SQLglobal("last_id", &last_id);
    
      typename = "varchar";
      sql_find_subtype(&ctype, typename, 1024, 0);
    

Comment 13762

Date: 2009-03-12 10:19:17 +0100
From: @skinkie

It is in.

Comment 13763

Date: 2010-05-04 09:32:09 +0200
From: Pseudo user for Sourceforge import <>

This bug was previously known as tracker item 2671706 at http://sourceforge.net/support/tracker.php?aid=2671706

@monetdb-team monetdb-team added enhancement New feature or request GDK Kernel invalid This doesn't seem right labels Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GDK Kernel invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants