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

xmlschema03 query tag table prefix bugs #714

Closed
peterdd opened this issue Mar 28, 2021 · 4 comments
Closed

xmlschema03 query tag table prefix bugs #714

peterdd opened this issue Mar 28, 2021 · 4 comments

Comments

@peterdd
Copy link
Contributor

peterdd commented Mar 28, 2021

  • Fails setting table prefix when no space between mytable and '(': (fix regexp)
<query>insert into mytable(field1,field2) values(1,2)</query>
  • no table prefix for multiline queries: (probably add missing 'm' multiline regexp option)
<query>insert into mytable
(field1,field2)
values(1,2)
</query>
  • update query regexp for table prefix completely wrong: (probably copy-paste error from the delete table regexp)
<query>update mytable set field2=4 where field1=1</query>

More details and example or PR will follow.

peterdd referenced this issue in flyspray/flyspray Mar 28, 2021
seems ADOdb 5.21.0 xmlschema03 query tag cannot yet handle multiline queries
@dregad
Copy link
Member

dregad commented Aug 22, 2021

@peterdd what is the status of this issue ? Are you planning to submit a PR or additional information as mentioned in your initial posting ?

@peterdd
Copy link
Contributor Author

peterdd commented Aug 23, 2021

No progress there. I stopped after finding the third simple issue within <query> section of xmlschema03 in a short time and stick to the use of queries that work at current(5.21.0 in my case) state. flyspray/flyspray@ade01ed

More important issue is that it data-dict for postgres is not working with xmlschema03 and have to patch 5.21.0 on install. flyspray/flyspray@44af76c
(related #11, #73, #383, #124, #125)

@mnewnham
Copy link
Contributor

mnewnham commented Sep 4, 2022

@peterdd . I have re-tested the issues described above, using MySQL and SQLite. I cannot see any errors generated. This is my xmlschema

<?xml version="1.0"?>
<schema version="0.3">
  <table name="xml_users">
    <descr>A typical users table for our application.</descr> 
    <field name="userId" type="I">
      <descr>A unique ID assigned to each user.</descr>
      <KEY/>
      <AUTOINCREMENT/>
    </field> 
    <field name="userName" type="C" size="16">
        <NOTNULL/>
    </field>
    <index name="userName">
      <descr>Put a unique index on the user name</descr>
      <col>userName</col>
     
    </index>
  </table>
  <sql>
    <descr>Insert some data into the users table.</descr>
    <query>insert into employees.xml_users 
           (userName) 
           values ( 'admin' )
     </query>
    <query>insert into employees.xml_users(userName) values ( 'Joe' )</query>
  </sql>
</schema>

I believe the XML above should address the issues raised above:

  1. Issue with multi-line SQL queries
  2. Issue where schema is attached to table name

Is there still a problem here? perhaps the issue has been fixed by other changes.

@mnewnham
Copy link
Contributor

As there has been no further discussion on this I am closing it as not reproducible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants