Skip to content

Conversation

@winicius-girardi
Copy link

This pull request includes several changes to enhance the codebase by adding EOF detection, removing leading zeros from numeric strings, and ensuring proper handling of integer columns in SQL commands.

EOF detection and handling:

  • Fonte/interface/parser.c: Added code to detect EOF (Ctrl+D) and terminate the main loop with a message indicating the connection is closing.

Leading zero removal:

  • Fonte/misc.c: Introduced the remove_zeros_on_left function to remove leading zeros from numeric strings, except when the string is "0".
  • Fonte/misc.h: Declared the remove_zeros_on_left function to ensure it can be used across different files.

Integer column handling in SQL commands:

  • Fonte/sqlcommands.c: Modified the finalizaInsert function to use remove_zeros_on_left for integer columns, preventing issues such as key duplication due to leading zeros.

winicius-girardi and others added 2 commits December 9, 2024 00:00
adicionado sanitazacao para zeros a esquerda em  colunas do tipo inteiro no momento da insercao, evitando duplicacoes de chaves.
@winicius-girardi winicius-girardi changed the title ajustes para os bugs 10 e 11 ajustes para os bugs 10 e 11 - Equipe 4 Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants