Beakerboy / Beakerboy/VBA-SQL-Library
SQLSelect — LeftJoin/RightJoin ByRef type mismatch
- Langage dominant
- VBA
- Étoiles
- 90
- Forks
- 18
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
SQLSelect: type LeftJoin/RightJoin params as String
- Component: `src/ClassModules/SQLSelect.cls` (around 120–143)
### Problem
- Untyped parameters (`Variant` ByRef) cause mismatches when passed into `AddJoin`.
### Snippet (actual)
```vb
Public Sub LeftJoin(sTable, sAlias, Optional sCondition As String = "")
AddJoin "LEFT OUTER", sTable, sAlias, sCondition
End Sub
Public Sub RightJoin(sTable, sAlias, Optional sCondition As String = "")
AddJoin "RIGHT OUTER", sTable, sAlias, sCondition
End Sub
```
### Expected
```vb
Public Sub LeftJoin(sTable As String, sAlias As String, Optional sCondition As String = "")
AddJoin "LEFT OUTER", sTable, sAlias, sCondition
End Sub
Public Sub RightJoin(sTable As String, sAlias As String, Optional sCondition As String = "")
AddJoin "RIGHT OUTER", sTable, sAlias, sCondition
End Sub
```
### Steps to Reproduce
1) Call `LeftJoin`/`RightJoin` with string literals under strict compilation.
### Actual
- Compile-time "ByRef argument type mismatch" in some contexts.
### Proposed Fix
- Type parameters as `String`.
---
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Open src/ClassModules/SQLSelect.cls around lines 120–143 and inspect the LeftJoin and RightJoin declarations and their calls to AddJoin. Compile or reproduce the strict-compilation case using string literals; done means both methods compile without the ByRef argument type mismatch.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- sql
- Domaine
- databases
- Type d'issue
- Bug
- Difficulté
- 1/5
- Temps estimé
- Moins d'une heure
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 55/100