Beakerboy / Beakerboy/VBA-SQL-Library

SQLSelect — LeftJoin/RightJoin ByRef type mismatch

Open
#62 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
VBA
Stars
90
Forks
18
PR merge metrics
No merged PRs in 30d

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`.

---

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.